GroupDocs.Watermark for Python via .NET 26.6 Release Notes
GroupDocs.Watermark for Python via .NET 26.6 brings the full watermarking capabilities of the underlying .NET library to Python, shipped as a self-contained wheel on PyPI. Add, search, and remove text and image watermarks across PDF, Word, Excel, PowerPoint, Visio, email, and image formats — with full control over position, size, opacity, rotation, alignment, and tiling — and save the result back to the original format, all on-premise, with no MS Office, OpenOffice, or separate .NET runtime required.
Full List of Changes in This Release
| Key | Category | Summary |
|---|---|---|
| WATERMARKPYTHON-53 | Enhancement | Updated to the GroupDocs.Watermark for .NET 26.6 engine and refreshed the bundled native dependencies for stability and security. |
Installation
pip install groupdocs-watermark-net
Quick start
from groupdocs.watermark import Watermarker
from groupdocs.watermark.watermarks import TextWatermark, Font
with Watermarker("document.pdf") as watermarker:
watermark = TextWatermark("CONFIDENTIAL", Font("Arial", 36.0))
watermark.opacity = 0.5
watermarker.add(watermark)
watermarker.save("watermarked.pdf")
Major Features
Text watermarks
Stamp configurable text watermarks with control over font, foreground and background color, opacity, rotation, sizing, and alignment.
from groupdocs.watermark import Watermarker
from groupdocs.watermark.watermarks import TextWatermark, Font, Color
with Watermarker("document.pdf") as watermarker:
watermark = TextWatermark("CONFIDENTIAL", Font("Arial", 48))
watermark.foreground_color = Color.red
watermark.opacity = 0.5
watermark.rotate_angle = -45
watermarker.add(watermark)
watermarker.save("watermarked.pdf")
Image watermarks
Add an image watermark from a file or an in-memory stream, with scaling, opacity, and positioning.
from groupdocs.watermark import Watermarker
from groupdocs.watermark.watermarks import ImageWatermark, SizingType
with Watermarker("document.docx") as watermarker:
watermark = ImageWatermark("logo.png")
watermark.sizing_type = SizingType.SCALE_TO_PARENT_DIMENSIONS
watermark.scale_factor = 0.5
watermark.opacity = 0.7
watermarker.add(watermark)
watermarker.save("watermarked.docx")
Positioning, sizing & tiling
Place a watermark by absolute coordinates or by horizontal/vertical alignment, add margins, scale to the parent dimensions, rotate, and repeat it across the page with configurable tile lines and spacing.
from groupdocs.watermark.watermarks import TextWatermark, Font, TileOptions, TileType
watermark = TextWatermark("DRAFT", Font("Arial", 19))
tile = TileOptions()
tile.tile_type = TileType.STRAIGHT # repeat across the page
watermark.tile_options = tile
watermark.opacity = 0.3
Search and remove watermarks
Find existing watermarks by text, image, color, size, or rotation — including watermarks added by other tools — then remove them individually or as a collection and save the cleaned document.
from groupdocs.watermark import Watermarker
from groupdocs.watermark.search.search_criteria import TextSearchCriteria
with Watermarker("watermarked.pdf") as watermarker:
possible = watermarker.search(TextSearchCriteria("CONFIDENTIAL"))
print("found:", len(possible))
watermarker.remove(possible) # remove the whole collection
watermarker.save("clean.pdf")
Document introspection and previews
Read a document’s format, page count, and per-page dimensions before processing, and render pages to PNG/JPEG/BMP images via a page-stream callback.
with Watermarker("document.pdf") as watermarker:
info = watermarker.get_document_info()
print("format:", info.file_type, "pages:", info.page_count)
Pythonic, AI-friendly API
The entire .NET API is exposed through Python-native naming: classes use PascalCase, methods and properties use snake_case (auto-mapped to the underlying .NET PascalCase), and enum values use UPPER_SNAKE_CASE. The wheel bundles an AGENTS.md reference (discovered at groupdocs/watermark/AGENTS.md) for AI coding assistants such as Claude Code, Cursor, and GitHub Copilot, and the documentation is available in an LLM-optimized form and via the GroupDocs MCP server.
Supported Document Formats
| Category | Formats |
|---|---|
| Word Processing | DOC, DOCX, DOCM, DOT, DOTX, RTF, ODT, OTT |
| Spreadsheets | XLS, XLSX, XLSM, XLSB, ODS |
| Presentations | PPT, PPTX, PPTM, PPS, PPSX, ODP |
| Fixed-Layout | |
| Diagrams | VSD, VSDX, VSS, VST, VDX |
| MSG, EML, EMLX | |
| Images | BMP, JPG, JPEG, PNG, GIF, TIFF, WEBP |
See the full list on the supported document formats page.
Public API Surface
from groupdocs.watermark import License, Metered, Watermarker, WatermarkerSettings, UnitOfMeasurement
from groupdocs.watermark.watermarks import TextWatermark, ImageWatermark, Color, Font, FontStyle, SizingType, TextAlignment, Margins, Thickness, TileOptions
from groupdocs.watermark.search.search_criteria import TextSearchCriteria, ImageSearchCriteria, ColorRange, SizeSearchCriteria, RotateAngleSearchCriteria
from groupdocs.watermark.common import IDocumentInfo, FileType, Point, Rectangle, HorizontalAlignment, VerticalAlignment
from groupdocs.watermark.options import LoadOptions, OoxmlLoadOptions, SaveOptions, WatermarkOptions, PreviewOptions
Classes
Watermarker— entry point and context manager; open by path or stream,add(),search(),remove(),save(),get_document_info(),get_images(),generate_preview(),get_content(),dispose()TextWatermark,ImageWatermark— text and image watermarks with color, opacity, rotation, sizing, alignment, margins, and tilingIDocumentInfo—.file_type,.page_count, and per-page dimensionsLicense,Metered— licensing APIsWatermarkerSettings— logger and configuration
Search criteria
TextSearchCriteria,ImageSearchCriteria,ColorRange,SizeSearchCriteria,RotateAngleSearchCriteria— combine with AND/OR/NOT to find existing watermarks
Options & enums
LoadOptions,OoxmlLoadOptions,SaveOptions,WatermarkOptions,PreviewOptionsColor,Font,FontStyle,SizingType,TextAlignment,Margins,Thickness,TileOptions,HorizontalAlignment,VerticalAlignment
Platform Wheels
The release ships as pre-built, self-contained wheels for the following platforms (no separate .NET runtime required):
| Platform | Wheel |
|---|---|
| Windows x64 | groupdocs_watermark_net-26.6.0-py3-none-win_amd64.whl |
| Linux x64 | groupdocs_watermark_net-26.6.0-py3-none-manylinux1_x86_64.whl |
| macOS x64 | groupdocs_watermark_net-26.6.0-py3-none-macosx_10_14_x86_64.whl |
| macOS ARM64 | groupdocs_watermark_net-26.6.0-py3-none-macosx_11_0_arm64.whl |
System Requirements
- Python: 3.5 – 3.14
- Platforms: Windows x64, Linux x64, macOS x64/ARM64
- No external software (MS Office / OpenOffice) required. On Linux install
libgdiplus,libfontconfig1, and fonts (e.g.ttf-mscorefonts-installer); on macOS installmono-libgdiplusvia Homebrew.
Evaluation Mode
The API works without a license in evaluation mode, with these limitations:
- Output carries an evaluation watermark (PDF output shows an evaluation mark; other formats show an equivalent mark).
- A hard cap of 10 documents applies per application run — opening an 11th document raises
RuntimeError: Only 10 documents can be loaded per application run in evaluation mode.
To remove these limitations, apply a license or request a free 30-day temporary license:
from groupdocs.watermark import License
License().set_license("path/to/license.lic")
Or set the environment variable (auto-applied at import):
export GROUPDOCS_LIC_PATH="path/to/license.lic"
Public API changes
No breaking API changes. This release tracks the underlying GroupDocs.Watermark for .NET 26.6 engine and refreshes the bundled dependencies for stability and security.