Last active
November 25, 2019 05:33
-
-
Save GroupDocsGists/d996df974503193541e8f246793ae842 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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