Save
Leave feedback
On this page
Saves the document data to the underlying stream.
public WatermarkResult Save()
Learn more about saving the documents Saving documents.
Remove particular text fragments from the email message body/subject and save the email message.
using (Watermarker watermarker = new Watermarker(@"D:\test.msg"))
{
SearchCriteria criteria = new TextSearchCriteria("test", false);
// Note, search is performed only if you pass TextSearchCriteria instance to Search method
PossibleWatermarkCollection watermarks = watermarker.Search(criteria);
// Remove found text fragments
watermarker.Remove(watermarks);
// Save changes
watermarker.Save();
}
- class WatermarkResult
- class Watermarker
- namespace GroupDocs.Watermark
- assembly GroupDocs.Watermark
Saves the document to the specified file location.
public WatermarkResult Save(string filePath)
| Parameter | Type | Description |
|---|---|---|
| filePath | String | The file path to save the document data to. |
Learn more about saving the documents Saving documents.
Add the watermark and save the document to another file.
using (Watermarker watermarker = new Watermarker("input.pdf"))
{
TextWatermark watermark = new TextWatermark("top secret", new Font("Arial", 36));
watermarker.Add(watermark);
watermarker.Save("ouput.pdf");
}
- class WatermarkResult
- class Watermarker
- namespace GroupDocs.Watermark
- assembly GroupDocs.Watermark
Saves the document to the specified stream.
public WatermarkResult Save(Stream document)
| Parameter | Type | Description |
|---|---|---|
| document | Stream | The stream to save the document data to. |
Learn more about saving the documents Saving documents.
Add watermark and save the document to the memory stream.
using (Watermarker watermarker = new Watermarker("input.pdf"))
{
TextWatermark watermark = new TextWatermark("top secret", new Font("Arial", 36));
watermarker.Add(watermark);
using (MemoryStream stream = new MemoryStream())
{
watermarker.Save(stream);
// ...
}
}
- class WatermarkResult
- class Watermarker
- namespace GroupDocs.Watermark
- assembly GroupDocs.Watermark
Saves the document data to the underlying stream using save options.
public WatermarkResult Save(SaveOptions options)
| Parameter | Type | Description |
|---|---|---|
| options | SaveOptions | Additional options to use when saving a document. |
Learn more about saving the documents Saving documents.
Add watermark and save the document with default SaveOptions.
using (Watermarker watermarker = new Watermarker("input.pdf"))
{
TextWatermark watermark = new TextWatermark("top secret", new Font("Arial", 36));
watermarker.Add(watermark);
watermarker.Save(new SaveOptions());
}
- class WatermarkResult
- class SaveOptions
- class Watermarker
- namespace GroupDocs.Watermark
- assembly GroupDocs.Watermark
Saves the document to the specified file location using save options.
public WatermarkResult Save(string filePath, SaveOptions options)
| Parameter | Type | Description |
|---|---|---|
| filePath | String | The file path to save the document data to. |
| options | SaveOptions | Additional options to use when saving a document. |
Learn more about saving the documents Saving documents.
Add the watermark and save the document to another file with default SaveOptions.
using (Watermarker watermarker = new Watermarker("input.pdf"))
{
TextWatermark watermark = new TextWatermark("top secret", new Font("Arial", 36));
watermarker.Add(watermark);
watermarker.Save("ouput.pdf", new SaveOptions());
}
- class WatermarkResult
- class SaveOptions
- class Watermarker
- namespace GroupDocs.Watermark
- assembly GroupDocs.Watermark
Saves the document to the specified stream using save options.
public WatermarkResult Save(Stream document, SaveOptions options)
| Parameter | Type | Description |
|---|---|---|
| document | Stream | The stream to save the document data to. |
| options | SaveOptions | Additional options to use when saving a document. |
Learn more about saving the documents Saving documents.
Add watermark and save the document to the memory stream with default SaveOptions.
using (Watermarker watermarker = new Watermarker("input.pdf"))
{
TextWatermark watermark = new TextWatermark("top secret", new Font("Arial", 36));
watermarker.Add(watermark);
using (MemoryStream stream = new MemoryStream())
{
watermarker.Save(stream, new SaveOptions());
// ...
}
}
- class WatermarkResult
- class SaveOptions
- class Watermarker
- namespace GroupDocs.Watermark
- assembly GroupDocs.Watermark
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.