GroupDocs.Watermark for Python via .NET API

Add Watermarks to Excel with Python

Easily add text or image watermarks to Excel files using Python. Our guides show you how to keep your spreadsheets professional and secure with little manual work.

Easily Add Watermarks: Python Watermarking for Excel

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 Excel 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 EXCEL 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.xslx") 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 EXCEL file
    watermarker.save("output.xslx")
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 library

GroupDocs.Watermark for Python via .NET lets you add watermarks to Excel spreadsheets in Python. You can use different watermark types and customize opacity, rotation, and alignment. The library also helps you find and manage existing watermarks to keep your files safe from tampering.
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.

Add Text and Image Watermarks to Excel with Python

Use GroupDocs.Watermark to quickly add custom watermarks to Excel files. Improve document security and branding with flexible watermarking tools.

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