GroupDocs.Watermark for Python via .NET

Create Watermarks in Word and OpenOffice with Python

Add watermarks to your Word documents using our Python library. Customize them to match your brand or security needs.

Easily Add Watermarks: Python Watermarking for Word

GroupDocs.Watermark for Python via .NET is a library that makes it easy to add watermarks to many business file types. Follow these steps to quickly add watermarks to your documents in Python:

  1. Get Started with Watermarking: Begin by creating an instance of the Watermarker class. Pass your Word file (as a path or stream) to the constructor to open it for watermarking.
  2. Create Your Watermark: Make a Watermark object with your desired text and settings. You can add watermarks to any page or even to document elements like headers or attachments.
  3. Customize the Watermark: Adjust the watermark’s size, position, font, color, and alignment to fit your needs. This helps your watermark look just right in your document.
  4. Apply and Save: Use the Watermarker method to add your watermark(s) to the document. Save the result, ideally to a new file for safety.
# Add a text watermark to a WORD file
import groupdocs.watermark as gw
import groupdocs.watermark.watermarks as gww
import groupdocs.watermark.common as gwс

# Select the file you want to watermark
with gw.Watermarker("input.docx") as watermarker:

    # Create a text watermark object
    font = gww.Font("Arial", 36.0)
    watermark = gww.TextWatermark("top secret", font)
    watermark.foreground_color = gww.Color.red
    watermark.horizontal_alignment = gwс.HorizontalAlignment.CENTER
    watermark.vertical_alignment = gwс.VerticalAlignment.CENTER
    watermark.opacity = 0.4

    watermarker.add(watermark)

    # Save the updated WORD file
    watermarker.save("output.docx")
pip install groupdocs-watermark-net
click to copy
copied
More examples Documentation

Explore More Watermarking Features

Use our Python API to add, view, convert, and manage watermarks in documents, slides, diagrams, and more. GroupDocs.Watermark for Python via .NET helps you protect your files and add copyright information easily.

Add Watermark

Add Watermarks Easily

GroupDocs.Watermark lets Python developers quickly add text, image, or dynamic watermarks to business documents. Keep your files secure and branded with minimal effort.

Fully Customizable Watermarks

Change watermark size, rotation, transparency, color, and font with GroupDocs.Watermark. Make your watermark fit your document perfectly and keep important content visible.

Use Document Features for Watermarking

Take advantage of built-in document features like PDF annotations, Word backgrounds, or Excel headers to add watermarks. GroupDocs.Watermark works with document structures for effective, non-intrusive watermarking.

Add an Image Watermark to DOCX

This example shows how to apply image effects to shape watermarks.

Python

import groupdocs.watermark as gw
import groupdocs.watermark.watermarks as gww
import groupdocs.watermark.options as gwo
import groupdocs.watermark.options.wordprocessing as gwow

# Open a Word document
load_options = gwow.WordProcessingLoadOptions()
with gw.Watermarker("source.docx", load_options) as watermarker:

    # Set watermark options
    with gww.ImageWatermark("logo.png") as watermark:

        effects = gwow.WordProcessingImageEffects()
        effects.brightness = 0.7
        effects.contrast = 0.6
        effects.chroma_key = gww.Color.red

        options = gwow.WordProcessingWatermarkSectionOptions()
        options.Effects = effects;

        # Create the watermark
        watermarker.add(watermark, options)

        # Save the document with the watermark
        watermarker.save("result.docx")

GroupDocs.Watermark for Python via .NET

GroupDocs.Watermark for Python via .NET makes it simple to add text and image watermarks to Microsoft Word documents in Python. You can place watermarks exactly where you want, and it works with DOC, DOCX, and RTF files. Watermarks blend in with your content, keeping your documents readable and secure.
Learn more
About illustration

Ready to get started?

Download GroupDocs.Watermark for free or get a trial license for full access!

Useful resources

Explore documentation, code samples, and community support to enhance your experience.

Watermark Word and OpenOffice Files with Python

Add professional watermarks to your Word and OpenOffice documents using our Python API. Protect your files and keep them looking great.

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English