WatermarkerAdd Method (Watermark, WatermarkOptions)
Adds a watermark to the loaded document using watermark options.

Namespace: GroupDocs.Watermark
Assembly: GroupDocs.Watermark (in GroupDocs.Watermark.dll) Version: 20.7.0
Syntax
public void Add(
	Watermark watermark,
	WatermarkOptions options
)

Parameters

watermark
Type: GroupDocs.WatermarkWatermark
The watermark to add to the document.
options
Type: GroupDocs.Watermark.OptionsWatermarkOptions
Additional options to use when adding the watermark.
Remarks
Learn more about adding watermarks Adding watermarks.
Examples
Add an image watermark to a particular page of a pdf document.
C#
PdfLoadOptions loadOptions = new PdfLoadOptions();
using (Watermarker watermarker = new Watermarker(@"C:\doc.pdf", loadOptions))
using (ImageWatermark watermark = new ImageWatermark(@"C:\watermark.png"))
{
    PdfXObjectWatermarkOptions options = new PdfXObjectWatermarkOptions();
    options.PageIndex = 0;

    watermarker.Add(watermark, options);
    watermarker.Save();
}
See Also