GroupDocs.Watermark for Python via .NET

Easily Update Word Watermarks with Python

Protect your brand and documents with GroupDocs.Watermark for Python via .NET. Quickly change watermarks in Word files.

Modify watermarks in Word documents with Python

GroupDocs.Watermark for Python via .NET helps Python developers easily update watermarks in various Word files. Here’s how you can use it in your project:

  1. First, open your Word file by passing it to the Watermarker constructor. You can use a file path, byte stream, or file stream.
  2. Then, find the watermarks you want to change using SearchCriteria, which lets you search for watermark text or properties.
  3. Once found, you can change details like text, font, size, position, color, and more. This gives you full control over how the watermark looks.
  4. After making changes, save the document. You can write the result to a stream or a file path.
# Update watermark text in WORD
import groupdocs.watermark as gw
import groupdocs.watermark.search.searchcriteria as gwss

# Create a Watermarker using a WORD file
with gw.Watermarker("input.docx") as watermarker:

    # Set up TextSearchCriteria to find watermark text
    search_criteria = gwss.TextSearchCriteria("test", False)

    possible_watermarks = watermarker.search(search_criteria)
        for watermark in possible_watermarks:
            try:
                # Modify watermark text
                watermark.text = "passed"
            except Exception as e:
                pass
    
    watermarker.save("output.docx")
pip install groupdocs-watermark-net
click to copy
copied
More examples Documentation

Discover more ways to update watermarks

With our library, Python apps can add, find, edit, or delete watermarks in many file types.

Watermark Editing

Watermark Your Files with Ease

Use GroupDocs.Watermark for Python via .NET to add and manage watermarks in your documents. Search, update, or remove watermarks as needed using a simple API.

Customize Watermarks to Fit Your Needs

Adjust watermark settings like font, size, orientation, and color using our flexible API to get exactly the result you want.

Use Format-Specific Features

Depending on the file format, you can use native features like headers, footers, annotations, or backgrounds as watermark areas.

Edit Text Watermark in Excel

This code shows how to change watermark text in Excel spreadsheets.

Python

# Open XLSX file
import groupdocs.watermark as gw
import groupdocs.watermark.watermarks as gww
import groupdocs.watermark.search.searchcriteria as gwss
import groupdocs.watermark.options.spreadsheet as gwos

# Read spreadsheet data
with gw.Watermarker("source.xlsx") as watermarker:

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

    # Change watermark text
    watermarks = watermarker.search(search_criteria)
    for watermark in watermarks:
        try:
            watermark.formatted_text_fragments.clear()
            watermark.formatted_text_fragments.add(
               "passed", 
                gww.Font("Calibri", 19.0, gww.FontStyle.bold), 
                gww.Color.red, 
                gww.Color.aqua
            )
        except Exception as e:
            pass

    # Save the result
    watermarker.save("output.xlsx")

GroupDocs.Watermark for Python via .NET

Secure Your Word Documents: Use GroupDocs.Watermark for Python via .NET to easily update and manage watermarks that match your document needs and branding.
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 Other File Formats

GroupDocs.Watermark for Python via .NET helps you protect multiple file types with flexible watermark 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