WordProcessingWatermarkSectionOptions

Inheritance: java.lang.Object, com.groupdocs.watermark.options.WatermarkOptions, com.groupdocs.watermark.options.WordProcessingWatermarkOptions, com.groupdocs.watermark.options.WordProcessingWatermarkBaseOptions

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();

Constructors

Constructor Description
WordProcessingWatermarkSectionOptions() Initializes a new instance of the [WordProcessingWatermarkSectionOptions](../../com.groupdocs.watermark.options/wordprocessingwatermarksectionoptions) class.

Methods

Method Description
getSectionIndex() Gets the index of a section to add the watermark to.
setSectionIndex(int value) Sets the index of a section to add the watermark to.

WordProcessingWatermarkSectionOptions()

public WordProcessingWatermarkSectionOptions()

Initializes a new instance of the [WordProcessingWatermarkSectionOptions](../../com.groupdocs.watermark.options/wordprocessingwatermarksectionoptions) class.

getSectionIndex()

public final int getSectionIndex()

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

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


-1 means all sections.

setSectionIndex(int value)

public final void setSectionIndex(int value)

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

Parameters:

Parameter Type Description
value int The index of a section to add the watermark to.

-1 means all sections. |