com.groupdocs.watermark.options

Interfaces

Classes

com.groupdocs.watermark.options

Class WordProcessingWatermarkSectionOptions



  • public final class WordProcessingWatermarkSectionOptions
    extends WordProcessingWatermarkBaseOptions
    Represents options when adding shape watermark to a Word document section.

    Learn more:

    The following example demonstrates how to add a watermark to a particular section of a Word document.

    WordProcessingLoadOptions loadOptions = new WordProcessingLoadOptions();
       Watermarker watermarker = new Watermarker("D:\\test.doc", loadOptions);
    
       TextWatermark watermark = new TextWatermark("Test", new Font("Arial", 14));
    
       WordProcessingWatermarkSectionOptions options = new WordProcessingWatermarkSectionOptions();
       options.setSectionIndex(0);
       
       watermarker.save("D:\\watermarked_test.doc");
       watermarker.close();
     
    • Method Detail

      • getSectionIndex

        public final int getSectionIndex()

        Gets the index of a section to add the watermark to.

        Returns:
        The index of a section to add the watermark to.


        -1 means all sections.
      • setSectionIndex

        public final void setSectionIndex(int value)

        Sets the index of a section to add the watermark to.

        Parameters:
        value - The index of a section to add the watermark to.


        -1 means all sections.