WordProcessingWatermarkSectionOptions class

WordProcessingWatermarkSectionOptions class

Represents options when adding shape watermark to a Word document section.

Learn more:

The WordProcessingWatermarkSectionOptions type exposes the following members:

Constructors

Constructor Description
init Initializes a new instance of the WordProcessingWatermarkSectionOptions class.

Properties

Property Description
section_index The index of a section to add the watermark to.
alternative_text The descriptive (alternative) text that will be associated with a shape. (inherited from WordProcessingWatermarkBaseOptions)
effects The effects to apply to the watermark, specified as a WordProcessingImageEffects or WordProcessingTextEffects instance. (inherited from WordProcessingWatermarkBaseOptions)
is_locked The property indicates whether editing of the shape in Word is forbidden. (inherited from WordProcessingWatermarkBaseOptions)
lock_type The watermark lock type. (inherited from WordProcessingWatermarkBaseOptions)
name The name of the shape. (inherited from WordProcessingWatermarkBaseOptions)
password The password used to lock the watermark. (inherited from WordProcessingWatermarkBaseOptions)

Fields

Field Description
DEFAULT Gets the default value for the class. (inherited from WatermarkOptions)

Example

from groupdocs.watermark import Watermarker
from groupdocs.watermark.watermarks import TextWatermark, Font, Color
from groupdocs.watermark.common import HorizontalAlignment, VerticalAlignment
from groupdocs.watermark.options.word_processing import (
    WordProcessingLoadOptions, WordProcessingWatermarkSectionOptions,
)

with Watermarker("./document.docx", WordProcessingLoadOptions()) as watermarker:
    watermark = TextWatermark("Test watermark", Font("Arial", 36.0))
    watermark.horizontal_alignment = HorizontalAlignment.CENTER
    watermark.vertical_alignment = VerticalAlignment.CENTER
    watermark.foreground_color = Color.red

    options = WordProcessingWatermarkSectionOptions()
    options.section_index = 0

    watermarker.add(watermark, options)
    watermarker.save("./output.docx")

See Also