Add watermarks to PowerPoint presentations

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Watermark MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-watermark -- dnx GroupDocs.Watermark.Mcp --yes
Folders, licensing and more →

Open a presentation with PresentationLoadOptions and pass a presentation-specific watermark option to add() to target a particular slide.

Add a watermark to a particular slide

Use PresentationWatermarkSlideOptions and set slide_index (0-based) to add the watermark to a specific slide.

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")

if __name__ == "__main__":
    add_watermark_to_slide()

presentation.pptx is the sample file used in this example. Click here to download it.

Binary file (PPTX, 292 KB)

Download full output

You can also add watermarks to master, layout, and notes slides with PresentationWatermarkMasterSlideOptions, PresentationWatermarkLayoutSlideOptions, and PresentationWatermarkNoteSlideOptions. Watermarker.get_content() returns a PresentationContent exposing each slide and its background.

For working with slide backgrounds and charts, see Working with slide backgrounds.