PdfAnnotationWatermarkOptions
Leave feedback
On this page
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();
| Constructor | Description |
|---|---|
| PdfAnnotationWatermarkOptions() | Initializes a new instance of the [PdfAnnotationWatermarkOptions](../../com.groupdocs.watermark.options/pdfannotationwatermarkoptions) class. |
| 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. |
public PdfAnnotationWatermarkOptions()
Initializes a new instance of the [PdfAnnotationWatermarkOptions](../../com.groupdocs.watermark.options/pdfannotationwatermarkoptions) class.
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.
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. |
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.
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. |
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.