WordProcessingWatermarkBaseOptions class

WordProcessingWatermarkBaseOptions class

Represents the base class for watermark adding options to a Word document.

The WordProcessingWatermarkBaseOptions type exposes the following members:

Properties

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

Fields

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

Example

from groupdocs.watermark import Watermarker
from groupdocs.watermark.options.word_processing import WordProcessingLoadOptions
from groupdocs.watermark.options.word_processing import WordProcessingWatermarkSectionOptions, WordProcessingLockType
from groupdocs.watermark.watermarks import TextWatermark, Font

with Watermarker("./document.docx", WordProcessingLoadOptions()) as watermarker:
    watermark = TextWatermark("Protected", Font("Arial", 36.0))
    options = WordProcessingWatermarkSectionOptions()
    options.is_locked = True
    options.lock_type = WordProcessingLockType.ALLOW_ONLY_FORM_FIELDS
    watermarker.add(watermark, options)
    watermarker.save("./output.docx")

See Also