PdfAnnotationWatermarkOptions

Inheritance: java.lang.Object, com.groupdocs.watermark.options.WatermarkOptions, com.groupdocs.watermark.options.PdfWatermarkOptions

public final class PdfAnnotationWatermarkOptions extends PdfWatermarkOptions

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

Learn more:

The following example demonstrates how to add an image annotation watermark to a PDF document.

PdfLoadOptions loadOptions = new PdfLoadOptions(); Watermarker watermarker = new Watermarker(“D:\test.pdf”, loadOptions);

ImageWatermark watermark = new ImageWatermark(“D:\icon.png”);

PdfAnnotationWatermarkOptions options = new PdfAnnotationWatermarkOptions(); options.setPageIndex(-1); // default - all pages

watermarker.add(watermark, options); watermarker.save(“D:\watermarked_test.pdf”); watermark.close(); watermarker.close();

Constructors

Constructor Description
PdfAnnotationWatermarkOptions() Initializes a new instance of the [PdfAnnotationWatermarkOptions](../../com.groupdocs.watermark.options/pdfannotationwatermarkoptions) class.

Methods

Method Description
getPageIndex() Gets the page index to add watermark to.
setPageIndex(int value) Sets the page index to add watermark to.
getPrintOnly() Get the value indicating whether annotation will be printed, but not displayed in pdf viewing application.
setPrintOnly(boolean value) Sets the value indicating whether annotation will be printed, but not displayed in pdf viewing application.

PdfAnnotationWatermarkOptions()

public PdfAnnotationWatermarkOptions()

Initializes a new instance of the [PdfAnnotationWatermarkOptions](../../com.groupdocs.watermark.options/pdfannotationwatermarkoptions) class.

getPageIndex()

public final int getPageIndex()

Gets the page index to add watermark to.

Returns: int - The page index to add watermark to.


-1 means all pages.

setPageIndex(int value)

public final void setPageIndex(int value)

Sets the page index to add watermark to.

Parameters:

Parameter Type Description
value int The page index to add watermark to.

-1 means all pages. |

getPrintOnly()

public final boolean getPrintOnly()

Get the value indicating whether annotation will be printed, but not displayed in pdf viewing application.

Returns: boolean - The value indicating whether annotation will be printed, but not displayed in pdf viewing application.

setPrintOnly(boolean value)

public final void setPrintOnly(boolean value)

Sets the value indicating whether annotation will be printed, but not displayed in pdf viewing application.

Parameters:

Parameter Type Description
value boolean The value indicating whether annotation will be printed, but not displayed in pdf viewing application.