PdfAnnotationWatermarkOptions

PdfAnnotationWatermarkOptions class

Represents watermark adding options when adding annotation watermark to a pdf document.

public sealed class PdfAnnotationWatermarkOptions : PdfWatermarkOptions

Constructors

Name Description
PdfAnnotationWatermarkOptions() Initializes a new instance of the PdfAnnotationWatermarkOptions class.

Properties

Name Description
PageIndex { get; set; } Gets or sets the page index to add watermark to.
PrintOnly { get; set; } Get or sets the value indicating whether annotation will be printed, but not displayed in pdf viewing application.

Remarks

Learn more:

Examples

Add an image annotation watermark to a PDF document.

PdfLoadOptions loadOptions = new PdfLoadOptions();
using (Watermarker watermarker = new Watermarker(@"D:\test.pdf", loadOptions))
{
    using (ImageWatermark watermark = new ImageWatermark(@"D:\icon.png"))
    {
        PdfAnnotationWatermarkOptions options = new PdfAnnotationWatermarkOptions();
        options.PageIndex = -1; // default - all pages

        watermarker.Add(watermark, options);
    }

    watermarker.Save();
}

See Also