Developer Guide

Welcome to the Developer Guide for GroupDocs.Merger for Python via .NET. This section provides practical, runnable code examples designed to help you quickly integrate and use every GroupDocs.Merger API feature in your projects.

Prerequisites

Before proceeding, please review:

  • System Requirements — supported platforms, Python versions, and optional native dependencies.
  • Installation — install from PyPI or a pre-downloaded wheel.

We recommend obtaining a Temporary License to test all product features without the evaluation page cap or watermark.

How to Run a Code Example

This topic explains how to run any code example from the Developer Guide. We will demonstrate using the Get Document Information example, but the steps are identical for every example.

Step 1: Create a folder

mkdir get-document-information
cd get-document-information

Step 2: Create and activate a virtual environment

Create:

py -m venv .venv
python3 -m venv .venv
python3 -m venv .venv

Activate:

.venv\Scripts\activate
source .venv/bin/activate
source .venv/bin/activate

Step 3: Install groupdocs-merger-net

py -m pip install groupdocs-merger-net
python3 -m pip install groupdocs-merger-net
python3 -m pip install groupdocs-merger-net

Step 4: (Optional) Set the license

Set the GROUPDOCS_LIC_PATH environment variable with the absolute path to your license file, or copy the .lic file into the folder:

$env:GROUPDOCS_LIC_PATH = "C:\path\to\GroupDocs.Merger.lic"
export GROUPDOCS_LIC_PATH="/path/to/GroupDocs.Merger.lic"
export GROUPDOCS_LIC_PATH="/path/to/GroupDocs.Merger.lic"

Step 5: Copy the code example

Create a file named get_document_info.py and paste the code from the Get Document Information page.

Step 6: Copy the input file

Download the sample input.pdf linked on the documentation page and place it in the same folder.

Step 7: Run the example

py get_document_info.py
python3 get_document_info.py
python3 get_document_info.py

Sample Files

Alongside each code example you will find source files to download for reference. Each example uses ./input.<ext> (and ./input2.<ext> for merges) as its input path — place the downloaded sample file in the same directory as the script before running.

Troubleshooting

If you encounter any issues while running the examples:

  • Ensure all dependencies are installed correctly and that native libraries (libgdiplus, libfontconfig1) are present on Linux.
  • Visit Technical Support for further assistance, or post on the free support forum.