com.groupdocs.watermark.options

Interfaces

Classes

com.groupdocs.watermark.options

Class PdfAnnotationWatermarkOptions



  • public final class PdfAnnotationWatermarkOptions
    extends PdfWatermarkOptions
    Represents watermark adding options when adding annotation watermark to a pdf document.

    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 Detail

    • Method Detail

      • getPageIndex

        public final int getPageIndex()

        Gets the page index to add watermark to.

        Returns:
        The page index to add watermark to.


        -1 means all pages.
      • setPageIndex

        public final void setPageIndex(int value)

        Sets the page index to add watermark to.

        Parameters:
        value - The page index to add watermark to.


        -1 means all pages.
      • getPrintOnly

        public final boolean getPrintOnly()
        Get the value indicating whether annotation will be printed, but not displayed in pdf viewing application.
        Returns:
        The value indicating whether annotation will be printed, but not displayed in pdf viewing application.
      • setPrintOnly

        public final void setPrintOnly(boolean value)
        Sets the value indicating whether annotation will be printed, but not displayed in pdf viewing application.
        Parameters:
        value - The value indicating whether annotation will be printed, but not displayed in pdf viewing application.