Product Page | Docs | Demos | API Reference | Blog | Search | Free Support | Temporary License
GroupDocs.Watermark for Python via .NET adds, searches, and removes text and image watermarks across PDF, Word, Excel, PowerPoint, Visio, email, and image formats through one unified API — style and position watermarks, tile them across a page, lock them, target specific pages or slides, and search or remove existing watermarks — all on-premise, with no MS Office or OpenOffice installation required.
- Text & Image Watermarks: Add styled text or image watermarks with configurable color, opacity, rotation, alignment, and sizing.
- Custom Fonts: Load and apply custom fonts for branded watermarks.
- Tiled Watermarks: Repeat a watermark across an entire page for full coverage.
- Format-Specific Placement: PDF annotations/artifacts, presentation slides, Visio pages, spreadsheet backgrounds and header/footers, and locked Word watermarks.
- Page Targeting: Apply watermarks to specific pages or the last page only.
- Search & Modify: Find watermarks by text, image similarity, or formatting; edit their text or remove them.
- On-Premise: No MS Office or OpenOffice installation required.
GroupDocs.Watermark for Python via .NET supports a wide range of file formats, including Word, Excel, PowerPoint, PDF, OpenDocument, Visio, email, and image formats. See the full list of supported formats for details.
-
Set Up Environment: Ensure that Python 3.5+ is installed on your system.
-
Get the Code: Clone or download this repository.
git clone git@github.com:groupdocs-watermark/GroupDocs.Watermark-for-Python-via-.NET.git
-
Navigate to the
ExamplesFoldercd ./GroupDocs.Watermark-for-Python-via-.NET/Examples -
Install Package: install dependencies with pip:
pip install -r requirements.txt
Alternatively, download the platform-specific
.whlfile from the GroupDocs Releases website and install it directly (adjust the filename to your platform —win_amd64,manylinux*_x86_64,macosx_*_arm64,macosx_*_x86_64):pip install ./groupdocs_watermark_net-26.6.0-py3-none-win_amd64.whl
-
Configure License (Optional): examples run with the full feature set when a license is available, looking in two places:
- The
GROUPDOCS_LIC_PATHenvironment variable — set it to the absolute path of your.licfile (recommended; the package auto-applies it at import). - A license applied explicitly in code via
License().set_license(...).
Without a license, the library runs in evaluation mode (the output is watermarked and only the first watermark per document is kept). Get a free 30-day temporary license for evaluation.
- The
-
Run the Examples: To run all the examples, execute the following command:
python ./run_all_examples.py
Each example runs in its own subprocess with paths relative to its own folder, so output files are placed next to the example script. You can also run an individual example by navigating to its folder and running the script directly.
Examples/
├── run_all_examples.py # Runs every example and prints a pass/fail summary
├── _run_example.py # Per-example wrapper (applies license, isolates eval limits)
├── requirements.txt
├── licensing/ # Set a license from a file, a stream, or a metered key
├── getting-started/
│ └── hello-world/ # Minimal add-a-watermark example
└── developer-guide/
├── basic-usage/ # Add text/image/custom-font/tile watermarks, document info, formats
└── advanced-usage/ # Loading options, format-specific placement, search & modify
The repository ships a Dockerfile that builds a Linux image with Python 3.13, the .NET runtime dependencies (libicu-dev, libgdiplus, libfontconfig1), and the groupdocs-watermark-net package preinstalled.
# Build the image
docker build -t watermark-examples .
# Run unlicensed (evaluation mode)
docker run --rm watermark-examples
# Run with a license mounted from the host
docker run --rm \
-v /path/to/license:/lic:ro \
-e GROUPDOCS_LIC_PATH=/lic/your-license.lic \
watermark-examplesOn Windows with Git Bash, set export MSYS_NO_PATHCONV=1 before docker run to prevent MSYS from rewriting the mounted license path.
The groupdocs-watermark-net wheel ships a bundled AGENTS.md reference for AI coding assistants (Claude Code, Cursor, GitHub Copilot in agent mode, and similar). Once the package is installed, the reference is discovered automatically at groupdocs/watermark/AGENTS.md — it covers canonical imports, quick-start usage, licensing, the API surface table, and troubleshooting. A copy also lives in this repository's root AGENTS.md.
For on-demand documentation lookups, combine the bundled AGENTS.md with the GroupDocs MCP server at https://docs.groupdocs.com/mcp. See the AI agents and LLM integration page for the per-tool setup snippets.
The .github/workflows/ directory contains the CI matrix that runs the full example suite on every push. The matrix is reproducible locally via the Dockerfile above.
Find additional details and examples in the GroupDocs.Watermark for Python via .NET documentation.
We also offer GroupDocs.Watermark packages for other platforms:
Product Page | Docs | Demos | API Reference | Blog | Search | Free Support | Temporary License
