Before running an example make sure that GroupDocs.Annotation for Python via .NET has been installed successfully.
The complete examples project for GroupDocs.Annotation for Python via .NET is hosted on GitHub. It contains standalone, runnable scripts together with the sample documents they use, so the examples work out of the box.
To run the examples without the evaluation watermark, point the GROUPDOCS_LIC_PATH environment variable at your license file. The example scripts read this variable and apply the license automatically:
The repository ships with all the sample documents and resources used by the examples, so the scripts run out of the box.
Note
Without a license the examples run in evaluation mode, which adds a watermark to each output document. There is no document-open limit, so every example completes successfully whether or not a license is applied. The run_all_examples.py runner launches each example in its own process and keeps the working directory set to the example’s folder, so each script finds its input and output files.
Run with Docker
The repository includes a Dockerfile that installs the native dependencies and Python packages so you can run the examples in a clean, reproducible container. From the repository root:
docker build -t groupdocs-annotation-examples .
docker run --rm groupdocs-annotation-examples
To use a license inside the container, mount it and pass GROUPDOCS_LIC_PATH:
Because the examples run headlessly and exit with a non-zero status on failure, they fit naturally into a CI pipeline. Install Examples/requirements.txt, supply the license through the GROUPDOCS_LIC_PATH environment variable (store the license as a protected secret), make sure the Linux native dependencies are present on the runner, and invoke python Examples/run_all_examples.py as a build step. The provided Dockerfile is a convenient base image for such jobs.
Troubleshooting
Evaluation watermark on the output — you are running unlicensed in evaluation mode. Set GROUPDOCS_LIC_PATH to a valid license to produce output without the watermark. See Licensing and Evaluation.
Missing or substituted fonts — install fonts so annotated output matches the original: apt install libfontconfig1 ttf-mscorefonts-installer.
ICU / globalization errors on Linux — install ICU: apt install libicu-dev.
ModuleNotFoundError: No module named 'groupdocs' — the package is not installed in the active environment. Activate your virtual environment and re-run pip install -r Examples/requirements.txt.
Contribute
If you would like to add or improve an example, we encourage you to contribute to the project. All examples in this repository are open source and can be freely used in your own applications. To contribute, fork the repository, edit the code, and create a pull request. We will review the changes and include them if found helpful.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.