PdfXObjectWatermarkOptions

PdfXObjectWatermarkOptions class

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

public sealed class PdfXObjectWatermarkOptions : PdfWatermarkOptions

Constructors

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

Properties

Name Description
PageIndex { get; set; } Gets or sets the page index to add watermark to.

Remarks

Learn more:

Examples

Add a watermark to a particular page of a pdf document.

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