GroupDocs.Watermark for Python via .NET Library

Secure and Simple Xlsx Watermark Updates in Python

Empower your Python projects with secure and reliable watermark editing powered by GroupDocs.Watermark for Python via .NET.

Use the Python API to Modify Watermarks in Xlsx Documents

With GroupDocs.Watermark for Python via .NET, Python developers can easily modify watermark content in various Xlsx documents. Here’s a quick walkthrough:

  1. Begin by loading the Xlsx document using the Watermarker class, accepting file paths, memory streams, or byte arrays as input.
  2. Construct a SearchCriteria object to search for existing watermark elements in your document, whether textual or graphical.
  3. Once identified, the tool provides a collection of matched watermark instances you can update—adjust parameters such as color, alignment, font, or even embedded image data.
  4. Finalize the process by saving your revised document to disk or any supported output stream using the built-in save methods.
# Update image watermark in XLSX file
import groupdocs.watermark as gw
import groupdocs.watermark.search.searchcriteria as gwss

# Create Watermarker instance with input file
with gw.Watermarker("input.xlsx") as watermarker:

    # Use SearchCriteria to locate image-based watermarks
    search_criteria = gwss.ImageDctHashSearchCriteria("logo.png")

    possible_watermarks = watermarker.search(search_criteria)
        for watermark in possible_watermarks:
            try:
                # Apply changes to image watermark
                watermark.ImageData = imageData
            except Exception as e:
                pass

    # Export updated XLSX file
    watermarker.save("output.xlsx")
pip install groupdocs-watermark-net
click to copy
copied
More examples Documentation

Boost Productivity with Advanced Watermarking Tools

Accelerate document branding and protection in Python with our dynamic watermarking API. Insert, detect, modify, or delete watermark layers with minimal effort.

Advanced Watermark Editing Workflow

Integrated Watermark Control

Bring full watermark lifecycle control to your Python applications using GroupDocs.Watermark for Python via .NET. Avoid repetitive tasks by automating watermark setup, updates, and removal.

Precision Tuning of Watermark Attributes

Take full control over watermark aesthetics—resize, recolor, rotate, or reposition them to meet any visual requirement with our flexible API surface.

Leverage Native Format Features

Adapt to any file format by embedding watermarks into headers, footers, annotations, or backgrounds. Our API respects native structures for optimal integration.

Modifying Watermark in a PDF File

Demonstrates how to change watermark properties in a PDF document.

Python

# Open PDF file
import groupdocs.watermark as gw
import groupdocs.watermark.watermarks as gww
import groupdocs.watermark.search.searchcriteria as gwss
import groupdocs.watermark.options.pdf as gwop

# Read watermark content
load_options = gwop.PdfLoadOptions()
with gw.Watermarker("source.pdf", load_options) as watermarker:

    search_criteria = gwss.TextSearchCriteria("test", False)
    search_criteria.pages = [1,5,8]

    # Apply watermark update
    watermarks = watermarker.search(search_criteria)
    for watermark in watermarks:
        try:
            watermark.formatted_text_fragments.clear()
            watermark.formatted_text_fragments.add(
                "New text", 
                gww.Font("Calibri", 5.0, gww.FontStyle.bold), 
                gww.Color.white, 
                gww.Color.aqua
            )
        except Exception as e:
            pass

    # Save edited result
    watermarker.save("output.pdf")

GroupDocs.Watermark for Python via .NET Suite

Watermark Customization for Spreadsheets: Manage watermark visibility and style confidently across Xlsx files with GroupDocs.Watermark.
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.

Cross-Type Watermark Tools

Protect and unify branding across document types using GroupDocs.Watermark for Python via .NET components.

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