Skip to main content

banner

PyPI PyPI - Python Version

Product Page | Docs | Demos | API Reference | Blog | Free Support | Temporary License

GroupDocs.Annotation for Python via .NET is a document-annotation API for adding, editing, and removing markup on documents and images. Draw area, point, arrow, ellipse, and distance shapes; highlight, underline, strikeout, squiggly, and replace text; add watermarks, images, links, and text fields; thread review comments (replies) on any annotation; then save the result back to the original format or export/import the annotations as XML — across PDF, Word, Excel, PowerPoint, Visio, images, and more through one unified API, with no MS Office or other external software required.

Get Started

pip install groupdocs-annotation-net
from groupdocs.annotation import Annotator
from groupdocs.annotation.models.annotation_models import AreaAnnotation
from groupdocs.annotation.models import Rectangle

with Annotator("document.pdf") as annotator:
    area = AreaAnnotation()
    area.box = Rectangle(100, 100, 200, 80)   # x, y, width, height
    area.page_number = 0
    area.message = "Review this section"
    annotator.add(area)
    annotator.save("annotated.pdf")

How It Works

The package is a self-contained Python wheel that bundles the embedded .NET runtime and every native dependency (SkiaSharp, Aspose.Drawing) needed to load, annotate, render, and save documents. No external software installation is required — just pip install and start annotating. The wheel works across Python 3.5 – 3.14 on Windows, Linux, and macOS (Intel + Apple Silicon).

Features

  • Shape annotations — area, point, arrow, ellipse, polyline, and distance markups with configurable box, color, pen style, and opacity.
  • Text markup — highlight, underline, strikeout, squiggly, replacement, and redaction annotations over document text.
  • Content annotations — watermarks, image stamps, link annotations, and editable text-field annotations.
  • Comments & replies — thread review comments on any annotation, each with an author and timestamp.
  • Add / update / remove — full lifecycle on annotations, individually or in batches, addressed by object or id.
  • Versioning — read back annotation versions and a specific version's annotations.
  • Import / export — round-trip annotations to/from an XML file or another document, separate from the source.
  • Previews — render pages to PNG/JPEG/BMP images via a page-stream callback.
  • Document introspection — read format, page count, and per-page dimensions before processing.
  • Cross-Platform — Windows x64/x86, Linux x64, macOS x64/ARM64.

Common Tasks

  • Add a colored box or arrow over a region of a PDF page and save it back
  • Highlight, underline, or strike out a passage of text in a document
  • Stamp a watermark or an image annotation onto a page
  • Attach a thread of review comments (replies) to an annotation
  • List, update, or remove the annotations already on a document
  • Export a document's annotations to XML and re-import them later
  • Render annotated pages to images for a preview UI

Supported File Formats

For a complete list, see supported formats.

Category Formats
Word Processing DOC, DOCX, DOCM, DOT, DOTX, DOTM, RTF, ODT, OTT, TXT
Spreadsheets XLS, XLSX, XLSM, XLSB, ODS, CSV
Presentations PPT, PPTX, PPTM, PPS, PPSX, ODP
Fixed-Layout PDF, TEX
Diagrams VSD, VSDX, VSS, VSSX, VSDM
Images BMP, JPG, JPEG, PNG, GIF, TIFF, WEBP, DCM, EMF, WMF
Web & Email HTML, MHTML, EML, EMLX, MSG

Examples

Add an area annotation

from groupdocs.annotation import Annotator
from groupdocs.annotation.models.annotation_models import AreaAnnotation
from groupdocs.annotation.models import Rectangle

with Annotator("document.pdf") as annotator:
    area = AreaAnnotation()
    area.box = Rectangle(100, 100, 200, 80)     # x, y, width, height
    area.background_color = 65535               # ARGB integer
    area.page_number = 0
    area.message = "Needs review"
    annotator.add(area)
    annotator.save("annotated.pdf")

Attach review comments (replies)

from groupdocs.annotation import Annotator
from groupdocs.annotation.models.annotation_models import AreaAnnotation
from groupdocs.annotation.models import Rectangle, Reply

reply1 = Reply(); reply1.comment = "Please double-check the figures"
reply2 = Reply(); reply2.comment = "Confirmed — looks good"

with Annotator("document.pdf") as annotator:
    area = AreaAnnotation()
    area.box = Rectangle(80, 80, 160, 60)
    area.page_number = 0
    area.replies = [reply1, reply2]
    annotator.add(area)
    annotator.save("reviewed.pdf")

List, update and remove annotations

from groupdocs.annotation import Annotator

with Annotator("annotated.pdf") as annotator:
    annotations = annotator.get()              # all annotations on the document
    for a in annotations:
        print(a.id, a.page_number, a.message)
    if annotations:
        annotator.remove(annotations[0])        # by object (or annotator.remove(id))
    annotator.save("cleaned.pdf")

Read annotation versions

from groupdocs.annotation import Annotator

with Annotator("annotated.pdf") as annotator:
    versions = annotator.get_versions_list()    # available annotation versions
    for v in versions:
        print("version:", v)
        for a in annotator.get_version(v):      # annotations in that version
            print("  ", a.id, a.message)

Render a page preview

from groupdocs.annotation import Annotator
from groupdocs.annotation.options import PreviewOptions, PreviewFormats

def create_page_stream(page_number):
    return open(f"page-{page_number}.png", "wb")

with Annotator("document.pdf") as annotator:
    opts = PreviewOptions(create_page_stream)
    opts.preview_format = PreviewFormats.PNG
    opts.page_numbers = [0, 1]
    annotator.document.generate_preview(opts)

Annotate from / to a binary stream

import io
from groupdocs.annotation import Annotator
from groupdocs.annotation.models.annotation_models import AreaAnnotation
from groupdocs.annotation.models import Rectangle

with open("document.pdf", "rb") as src:
    with Annotator(src) as annotator:
        area = AreaAnnotation(); area.box = Rectangle(50, 50, 120, 40); area.page_number = 0
        annotator.add(area)
        buffer = io.BytesIO()
        annotator.save(buffer)          # BytesIO is updated after save
        data = buffer.getvalue()

AI Agent & LLM Friendly

This package is designed for seamless integration with AI agents, LLMs, and automated code generation tools.

  • AGENTS.md in the package — AI coding assistants (Claude Code, Cursor, GitHub Copilot) auto-discover the API surface, usage patterns, and troubleshooting tips from the installed package
  • MCP server — connect your AI tool to GroupDocs documentation for on-demand API lookups:
    { "mcpServers": { "groupdocs-docs": { "url": "https://docs.groupdocs.com/mcp" } } }
    
  • Machine-readable docs — full documentation available as plain text for RAG and LLM context:
    • Single file: https://docs.groupdocs.com/annotation/python-net/llms-full.txt
    • Per page: append .md to any docs URL

Evaluation Mode

The API works without a license in evaluation mode, with these limitations:

  • Output is restricted: PDF output carries an evaluation watermark and other formats show an equivalent evaluation mark.
  • A page/document-count cap applies to processed documents.

To remove these limitations, apply a license or request a temporary license:

from groupdocs.annotation 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"

Troubleshooting

Issue Platform Fix
Evaluation watermark on output All Apply a license — License().set_license(...) or set GROUPDOCS_LIC_PATH
System.Drawing.Common is not supported Linux/macOS apt-get install libgdiplus (Linux) or brew install mono-libgdiplus (macOS)
The type initializer for 'Gdip' threw an exception macOS brew install mono-libgdiplus
Garbled text / missing fonts in output Linux apt-get install ttf-mscorefonts-installer fontconfig && fc-cache -f
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT errors Linux Do NOT set this variable. ICU must be available.

System Requirements

  • Python 3.5 - 3.14
  • Windows x64/x86, Linux x64, macOS x64/ARM64
  • No additional software required

More Resources

Also available for other platforms: .NET | Java | Node.js


Product Page | Docs | Demos | API Reference | Blog | Free Support | Temporary License

Metadata

Release files for groupdocs-annotation-net 26.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for groupdocs-annotation-net 26.6.0
File Actions
groupdocs_annotation_net-26.6.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for groupdocs_annotation_net-26.6.0-py3-none-win_amd64.whl
groupdocs_annotation_net-26.6.0-py3-none-manylinux1_x86_64.whl Python 3 none Linux glibc 2.5+ x86-64 Details for groupdocs_annotation_net-26.6.0-py3-none-manylinux1_x86_64.whl
groupdocs_annotation_net-26.6.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for groupdocs_annotation_net-26.6.0-py3-none-macosx_11_0_arm64.whl
groupdocs_annotation_net-26.6.0-py3-none-macosx_10_14_x86_64.whl Python 3 none macOS 10.14+ x86-64 Details for groupdocs_annotation_net-26.6.0-py3-none-macosx_10_14_x86_64.whl

Total release size: 603.9 MB

Release files / groupdocs_annotation_net-26.6.0-py3-none-win_amd64.whl

Download URL groupdocs_annotation_net-26.6.0-py3-none-win_amd64.whl
Size 151.0 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
f96c7f1450d597d078f3c345a6ebe39f616351bcbb26819a8cc19265f5b0962a
BLAKE2b-256 checksum
How to use checksums
45ca88708758598c7eb5be99141db491619d1ec6d974a6bc378a1c907d1f2cca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / groupdocs_annotation_net-26.6.0-py3-none-manylinux1_x86_64.whl

Download URL groupdocs_annotation_net-26.6.0-py3-none-manylinux1_x86_64.whl
Size 150.3 MB
Tags Linux glibc 2.5+ x86-64 Python 3
SHA-256 checksum
How to use checksums
dbb220de7e1dc1d1d81daaebd2b1a211206ca305e39e4accc21c34741f57fa2c
BLAKE2b-256 checksum
How to use checksums
df8453e62f1bceff1fcfce460ece4f2ebe22411a71bfea4dc9c9b69242e1832c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / groupdocs_annotation_net-26.6.0-py3-none-macosx_11_0_arm64.whl

Download URL groupdocs_annotation_net-26.6.0-py3-none-macosx_11_0_arm64.whl
Size 150.2 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e1abf1263f7f015bbb2e2fec4963c9a3e14bc8e541280a897221de3f770c0617
BLAKE2b-256 checksum
How to use checksums
9c4fc71e3c7cf9bcd042ae7b5e865c04a30b3214b86119cfc6f2b487758d2c7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / groupdocs_annotation_net-26.6.0-py3-none-macosx_10_14_x86_64.whl

Download URL groupdocs_annotation_net-26.6.0-py3-none-macosx_10_14_x86_64.whl
Size 152.4 MB
Tags Python 3 macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
165a43c1c31c18ac61435e0dad72117697b76dc30e3437b37ec25b2a0f5c1345
BLAKE2b-256 checksum
How to use checksums
a3c9209eb65018a6d02c1292cdd0d7e597ac6ed88088abca3d133be24ea960b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Security for groupdocs-annotation-net 26.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

26.6.0 This release

4 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page