public final class PdfAnnotationWatermarkOptions extends PdfWatermarkOptions
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 and Description |
---|
PdfAnnotationWatermarkOptions()
Initializes a new instance of the
class. |
Modifier and Type | Method and Description |
---|---|
int |
getPageIndex()
Gets the page index to add watermark to.
|
boolean |
getPrintOnly()
Get the value indicating whether annotation will be printed, but not displayed in pdf viewing application.
|
void |
setPageIndex(int value)
Sets the page index to add watermark to.
|
void |
setPrintOnly(boolean value)
Sets the value indicating whether annotation will be printed, but not displayed in pdf viewing application.
|
public PdfAnnotationWatermarkOptions()
PdfAnnotationWatermarkOptions
class.public final int getPageIndex()
Gets the page index to add watermark to.
public final void setPageIndex(int value)
Sets the page index to add watermark to.
value
- The page index to add watermark to.public final boolean getPrintOnly()
public final void setPrintOnly(boolean value)
value
- The value indicating whether annotation will be printed, but not displayed in pdf viewing application.