GroupDocs.Merger for Python via .NET 26.6 Release Notes
This release rebuilds the Python binding as a modern typed API, adds Python 3.14 support and AI agent integration, enables page-preview rendering and stream-based split from Python, and ships self-contained wheels for Windows, Linux, and macOS.
Full List of Changes in This Release
| Key | Category | Summary |
|---|---|---|
| MERGERPYTHON‑30 | Enhancement | Rebuilt the Python binding — a typed, per-overload API with bundled .pyi stubs |
| MERGERPYTHON‑31 | Feature | Python 3.14 support (Requires-Python is now >=3.5,<3.15) |
| MERGERPYTHON‑32 | Feature | Page-preview rendering (generate_preview) and stream-based split are now callable from Python via page-stream callbacks |
| MERGERPYTHON‑33 | Feature | Ship AGENTS.md inside the package for AI agent / LLM integration |
Major Features
A modern, typed Python API
Every class, method overload, and enum is emitted explicitly with type hints and .pyi stubs, so editors provide accurate autocomplete and there is no dynamic attribute proxy at runtime. The Merger class follows a simple open → operate → save flow and works as a context manager:
from groupdocs.merger import Merger
# Combine two documents of the same family into one
with Merger("input.docx") as merger:
merger.join("input2.docx")
merger.save("merged.docx")
Split, reorder, and manage pages with the same API:
from groupdocs.merger import Merger
from groupdocs.merger.domain.options import (
SplitOptions, ExtractOptions, RotateOptions, RotateMode,
)
with Merger("input.pdf") as merger:
# Keep pages 1-3, rotate page 2, then save
merger.extract_pages(ExtractOptions([1, 2, 3]))
merger.rotate(RotateOptions(RotateMode.ROTATE90, [2]))
merger.save("reordered.pdf")
# Split a document into one file per page
with Merger("input.pdf") as merger:
merger.split(SplitOptions("page_{0}.pdf", [1, 2, 3]))
The release covers the full document-manipulation surface: merge/join (whole files, page subsets, images, Word/PDF-specific options), split (by page list, interval, or text lines), page operations (extract, remove, swap, move, rotate, change orientation), password management, document inspection, and page preview.
Page-preview rendering from Python
generate_preview now accepts a plain Python callback, so you can rasterize pages to PNG, JPEG, or BMP without dropping to .NET. The callback returns a writable file stream for each requested page:
from groupdocs.merger import Merger
from groupdocs.merger.domain.options import PreviewOptions, PreviewMode
def create_page_stream(page_number):
return open(f"page-{page_number}.png", "wb")
with Merger("input.pdf") as merger:
merger.generate_preview(PreviewOptions(create_page_stream, PreviewMode.PNG, [1, 2]))
The same page-stream callback mechanism also powers stream-based split.
Python 3.14 support
The supported Python range is extended to 3.5 – 3.14. The Requires-Python metadata reads >=3.5,<3.15, and the PyPI page lists classifiers through Python 3.14. The wheel is py3-none-{platform}, so a single build works across all supported interpreters without recompilation.
AGENTS.md — AI Agent and LLM Integration
The groupdocs-merger-net pip package now ships an AGENTS.md file at groupdocs/merger/AGENTS.md inside the wheel. AI coding assistants that scan installed packages — such as Claude Code, Cursor, and GitHub Copilot — can automatically discover the API surface, import paths, usage patterns, and troubleshooting tips.
pip show -f groupdocs-merger-net | grep AGENTS
See the Agents and LLM Integration documentation page for MCP server setup, machine-readable documentation URLs, and example pipelines.
API Overview
| Method | Returns | Description |
|---|---|---|
Merger(path | stream[, load_options[, settings]]) | Open a document by path or binary stream; optional LoadOptions (password / type) and MergerSettings. Use as a context manager | |
join(path | stream[, join_options]) | IMerger | Append another document; optional JoinOptions / PageJoinOptions / ImageJoinOptions / WordJoinOptions / PdfJoinOptions |
split(split_options) | IMerger | Split into multiple files via SplitOptions or TextSplitOptions |
extract_pages / remove_pages / swap_pages / move_page | IMerger | Keep, delete, swap, or move pages |
rotate(rotate_options) / change_orientation(orientation_options) | IMerger | Rotate pages or set portrait/landscape |
add_password / update_password / remove_password / is_password_set | IMerger / bool | Document password management |
generate_preview(preview_options) | None | Render pages to PNG/JPEG/BMP via a page-stream callback |
get_document_info() | IDocumentInfo | Format, page count, size, and per-page dimensions |
save(path | stream[, save_options]) | IMerger | Save the current state to a path or stream |
Platform Wheels
| Platform | Wheel suffix |
|---|---|
| Windows 64-bit | py3-none-win_amd64.whl |
| Linux x64 (glibc) | py3-none-manylinux1_x86_64.whl |
| macOS Intel | py3-none-macosx_10_14_x86_64.whl |
| macOS Apple Silicon | py3-none-macosx_11_0_arm64.whl |
Requirements
- Python: 3.5 through 3.14
- Platforms: Windows (x64), Linux (x64 glibc), macOS (Intel and Apple Silicon)
- Optional system dependencies (Linux/macOS, for image join and page preview):
libgdiplus,libfontconfig1,libicu-dev. See System Requirements.
Evaluation and Licensing
Without a license the library runs in evaluation mode: processed documents are subject to a page/document-count cap, and PDF output carries an evaluation watermark (other formats show an equivalent evaluation mark). Apply a license (or set GROUPDOCS_LIC_PATH) to lift both limits. A free 30-day temporary license is available.
Additional Resources
Feedback
If you have any questions, issues, or suggestions, please reach out through the Free Support Forum.