public final class PdfArtifactWatermarkOptions extends PdfWatermarkOptions
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();
| Constructor and Description |
|---|
PdfArtifactWatermarkOptions()
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 PdfArtifactWatermarkOptions()
PdfArtifactWatermarkOptions class.Copyright © 2026. All rights reserved.