Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Last active November 25, 2019 05:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GroupDocsGists/d996df974503193541e8f246793ae842 to your computer and use it in GitHub Desktop.
Save GroupDocsGists/d996df974503193541e8f246793ae842 to your computer and use it in GitHub Desktop.
TiffImageLoadOptions loadOptions = new TiffImageLoadOptions();
using (Watermarker watermarker = new Watermarker("sample.tiff", loadOptions))
{
// Initialize text or image watermark
TextWatermark watermark = new TextWatermark("Test watermark", new Font("Arial", 19));
// Add watermark to a particular frame of image
MultiframeImageWatermarkOptions options = new MultiframeImageWatermarkOptions();
options.FrameIndex = 0;
watermarker.Add(watermark, options);
watermarker.Save("output.tiff");
}
LoadOptions loadOptions = new LoadOptions();
loadOptions.Password = "P@$$w0rd";
string filePath = "sample.docx";
using (Watermarker watermarker = new Watermarker(filePath, loadOptions))
{
// use watermarker methods to manage watermarks in the document
TextWatermark watermark = new TextWatermark("Test watermark", new Font("Arial", 12));
watermarker.Add(watermark);
watermarker.Save("output.docx");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment