PdfXObjectWatermarkOptions
Leave feedback
On this page
Inheritance: java.lang.Object, com.groupdocs.watermark.options.WatermarkOptions, com.groupdocs.watermark.options.PdfWatermarkOptions
public final class PdfXObjectWatermarkOptions extends PdfWatermarkOptions
Represents watermark adding options when adding XObject watermark to a pdf document.
Learn more:
The following example demonstrates how to add a watermark to a particular page of a pdf document.
PdfLoadOptions loadOptions = new PdfLoadOptions(); Watermarker watermarker = new Watermarker(“C:\doc.pdf”, loadOptions);
ImageWatermark watermark = new ImageWatermark(“C:\watermark.png”);
PdfXObjectWatermarkOptions options = new PdfXObjectWatermarkOptions(); options.setPageIndex(0);
watermarker.add(watermark, options); watermarker.save(“C:\watermarked_doc.pdf”); watermark.close(); watermarker.close();
| Constructor | Description |
|---|---|
| PdfXObjectWatermarkOptions() | Initializes a new instance of the [PdfXObjectWatermarkOptions](../../com.groupdocs.watermark.options/pdfxobjectwatermarkoptions) class. |
| Method | Description |
|---|---|
| getPageIndex() | Gets the page index to add watermark to. |
| setPageIndex(int value) | Sets the page index to add watermark to. |
public PdfXObjectWatermarkOptions()
Initializes a new instance of the [PdfXObjectWatermarkOptions](../../com.groupdocs.watermark.options/pdfxobjectwatermarkoptions) class.
public final int getPageIndex()
Gets the page index to add watermark to.
Returns: int - The page index to add watermark to.
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. |
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.