PdfArtifactWatermarkOptions
Inheritance: java.lang.Object, com.groupdocs.watermark.options.WatermarkOptions, com.groupdocs.watermark.options.PdfWatermarkOptions
public final class PdfArtifactWatermarkOptions extends PdfWatermarkOptions
Represents watermark adding options when adding artifact watermark to a pdf document.
Leran more:
The following example demonstrates how to add an image artifact watermark to a PDF document.
PdfLoadOptions loadOptions = new PdfLoadOptions(); Watermarker watermarker = new Watermarker(“D:\test.pdf”, loadOptions);
ImageWatermark watermark = new ImageWatermark(“D:\icon.png”);
PdfArtifactWatermarkOptions options = new PdfArtifactWatermarkOptions(); options.setPageIndex(-1); // default - all pages
watermarker.add(watermark, options); watermarker.save(“D:\watermarked_test.pdf”); watermark.close(); watermarker.close();
Constructors
Constructor | Description |
---|---|
PdfArtifactWatermarkOptions() | Initializes a new instance of the [PdfArtifactWatermarkOptions](../../com.groupdocs.watermark.options/pdfartifactwatermarkoptions) class. |
Methods
Method | Description |
---|---|
getPageIndex() | Gets the page index to add watermark to. |
setPageIndex(int value) | Sets the page index to add watermark to. |
PdfArtifactWatermarkOptions()
public PdfArtifactWatermarkOptions()
Initializes a new instance of the [PdfArtifactWatermarkOptions](../../com.groupdocs.watermark.options/pdfartifactwatermarkoptions)
class.
getPageIndex()
public final int getPageIndex()
Gets the page index to add watermark to.
Returns: int - The page index to add watermark to.
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. |