Every code example shown on this documentation site lives in a standalone, runnable form in the GroupDocs.Merger-for-Python-via-.NET repository on GitHub. Each example ships with its input sample files, so you can clone the repo and run anything with a single command.
Prerequisites
Before running the examples, make sure you have:
A supported platform and Python version — see System Requirements. Windows, Linux, and macOS (Intel and Apple Silicon) are all supported.
Git — or download the repository as a ZIP from GitHub.
A license file (optional but recommended) — without one, the library runs in evaluation mode with a watermark on output and a 3-page cap on multi-page operations. See Licensing for how to obtain a free temporary license.
Get the Code
Clone the repository and navigate into it:
git clone https://github.com/groupdocs-merger/GroupDocs.Merger-for-Python-via-.NET.git
cd GroupDocs.Merger-for-Python-via-.NET
Project Structure
The repository mirrors this documentation tree. Every documentation page maps to a folder under Examples/, and every tabbed code block on a page maps to a .py file inside that folder. Input sample files live next to the script that reads them.
Configure a license (optional). The suite honours the GROUPDOCS_LIC_PATH environment variable. Set it in your shell before running run_all_examples.py:
Learn more about licensing, evaluation limits, and how to obtain a free 30-day temporary license in the Licensing documentation topic.
Run the Examples
Run the Full Suite
From the repository root, invoke run_all_examples.py. It imports every example in order, prints a per-file status line, and exits with a pass/fail summary.
pyExamples\run_all_examples.py
python3 Examples/run_all_examples.py
python3 Examples/run_all_examples.py
Run a Single Example
Change into the folder that contains the script and run it directly. Input sample files live next to each script, so relative paths resolve correctly.
cd Examples/getting-started/quick-start-guide
python3 merge_two_documents.py
Every example writes its output artefacts into the same folder as the script.
Run with Docker
The repository includes a Dockerfile that installs the ICU runtime, libgdiplus, libfontconfig1, and every Python dependency, then runs the full suite. Use it when you want a clean, reproducible Linux environment:
Every push to main triggers .github/workflows/run-examples.yml, which runs the entire example suite on ubuntu-latest with Python 3.13. Fork the repository and open a pull request — the workflow runs for free on GitHub-hosted runners.
Troubleshooting
DllNotFoundException: libgdiplus on Linux — install the native dependency: sudo apt-get install libgdiplus libfontconfig1. See System Requirements.
Garbled text or missing glyphs — install Microsoft TrueType fonts (ttf-mscorefonts-installer on Debian/Ubuntu) and run fc-cache -f so fontconfig picks them up.
Evaluation watermark / page cap (3 pages) — set GROUPDOCS_LIC_PATH to a valid license file and re-run. In evaluation mode, multi-page documents are capped at 3 pages and outputs carry a watermark. Operations on documents with 3 pages or fewer are unaffected. See Licensing.