Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.