public final class PdfXObjectWatermarkOptions extends PdfWatermarkOptions
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 and Description |
---|
PdfXObjectWatermarkOptions()
Initializes a new instance of the
class. |
Modifier and Type | Method and Description |
---|---|
int |
getPageIndex()
Gets the page index to add watermark to.
|
void |
setPageIndex(int value)
Sets the page index to add watermark to.
|
public PdfXObjectWatermarkOptions()
PdfXObjectWatermarkOptions
class.