WordProcessingWatermarkPagesOptions class

WordProcessingWatermarkPagesOptions class

Represents options when adding watermark to Word document pages.

Learn more:

The WordProcessingWatermarkPagesOptions type exposes the following members:

Constructors

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

Properties

Property Description
page_numbers The page numbers to add the watermark.
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

import groupdocs.watermark as gw
import groupdocs.watermark.watermarks as gww
import groupdocs.watermark.options.wordprocessing as gwo_wp

load_options = gw.WordProcessingLoadOptions()
with gw.Watermarker("document.docx", load_options) as watermarker:
    watermark = gww.TextWatermark("DRAFT", gww.Font("Arial", 42.0))
    options = gwo_wp.WordProcessingWatermarkPagesOptions()
    options.page_numbers = [1]  # target first page
    watermarker.add(watermark, options)
    watermarker.save("document.docx")

See Also