PresentationWatermarkSlideOptions class

PresentationWatermarkSlideOptions class

Represents options when adding a watermark to a Presentation document slide.

Learn more:

The PresentationWatermarkSlideOptions type exposes the following members:

Constructors

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

Properties

Property Description
slide_index The index of the slide to add the watermark to.
alternative_text The descriptive (alternative) text that will be associated with a shape. (inherited from PresentationWatermarkBaseSlideOptions)
effects The effects to apply to the watermark, specified as a PresentationImageEffects or PresentationTextEffects instance. (inherited from PresentationWatermarkBaseSlideOptions)
is_locked The property indicates whether editing of the shape in PowerPoint is forbidden. (inherited from PresentationWatermarkBaseSlideOptions)
name The name of the shape. (inherited from PresentationWatermarkBaseSlideOptions)
protect_with_unreadable_characters The property indicating whether the text watermark characters are mixed with unreadable characters. (inherited from PresentationWatermarkBaseSlideOptions)

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.presentation import (
    PresentationLoadOptions, PresentationWatermarkSlideOptions,
)

def add_watermark_to_slide():
    with Watermarker("./presentation.pptx", PresentationLoadOptions()) as watermarker:
        watermark = TextWatermark("CONFIDENTIAL", Font("Arial", 19.0))
        watermark.foreground_color = Color.red
        watermark.horizontal_alignment = HorizontalAlignment.CENTER
        watermark.vertical_alignment = VerticalAlignment.CENTER

        options = PresentationWatermarkSlideOptions()
        options.slide_index = 0
        watermarker.add(watermark, options)

        watermarker.save("./output.pptx")

See Also