GroupDocs.Annotation for Python via .NET Overview
Leave feedback
On this page
What is GroupDocs.Annotation?
GroupDocs.Annotation for Python via .NET is a native Python library that adds, edits, and removes annotations and markup on documents — across PDF, Microsoft Word, Excel, PowerPoint, images, CAD, Visio, and email formats — through a single, format-independent API. It runs entirely on-premise, requires no Microsoft Office or Adobe Acrobat installation, and ships as a pre-built wheel on Windows, Linux, and macOS.
Typical uses include:
Document review & collaboration — add area, shape, and text-markup annotations and attach threaded reviewer comments so teams can discuss a document in place.
Legal & contract markup — highlight clauses, strike out obsolete text, and flag regions that need attention before a document is signed or shared.
Engineering & design review — annotate CAD drawings and Visio diagrams with area, arrow, and distance markups.
Content & e-learning feedback — mark up images and scanned pages with points, watermarks, and image stamps.
Automated annotation pipelines — stamp watermarks, links, and notes across many documents and save only the annotation types or page ranges you need.
Key Capabilities
Capability
Description
Shape Annotations
Draw area, ellipse, arrow, point, distance, and polyline annotations with configurable color and opacity.
Text Markup
Highlight, underline, strikeout, and squiggly-mark text, plus replacement, text-redaction, and resources-redaction annotations.
Content Annotations
Stamp watermarks, image annotations, hyperlinks, and editable text fields onto a document.
Comments & Replies
Attach threaded review comments — with user and timestamp — to any annotation.
Manage Annotations
List, update, and remove annotations, all of them or filtered by annotation type.
Save Filters
Render only selected annotation types, or a specific page range, when saving the result.
Document Inspection
Read file type, page count, and size without modifying the document.
Every capability is covered with runnable, copy-paste examples in the Developer Guide.
Quick Example
Add an annotation and save the result with just a few lines of code. The example draws a yellow area annotation on the first page of sample.pdf and writes the result to annotated.pdf:
fromgroupdocs.annotationimportAnnotatorfromgroupdocs.annotation.modelsimportRectanglefromgroupdocs.annotation.models.annotation_modelsimportAreaAnnotationfromgroupdocs.pydrawingimportColordefannotate_area():# Open the documentwithAnnotator("./sample.pdf")asannotator:# Build an area annotation on the first pagearea=AreaAnnotation()area.box=Rectangle(100,100,200,80)# x, y, width, heightarea.page_number=0# 0-based page indexarea.background_color=Color.yellow.to_argb()# ARGB int, not a Color objectarea.message="Review this section"annotator.add(area)# Save the annotated documentannotator.save("./annotated.pdf")if__name__=="__main__":annotate_area()
sample.pdf is the sample file used in this example. Click here to download it.
For richer review workflows, add several annotations, attach a comment thread, and save only the area annotations with a page-range filter using SaveOptions:
fromgroupdocs.annotationimportAnnotatorfromgroupdocs.annotation.modelsimportRectangle,Point,Replyfromgroupdocs.annotation.models.annotation_modelsimportAreaAnnotation,HighlightAnnotationfromgroupdocs.annotation.optionsimportSaveOptions,AnnotationTypefromgroupdocs.pydrawingimportColordefannotate_with_options():withAnnotator("./sample.pdf")asannotator:# An area annotation carrying a threaded review commentarea=AreaAnnotation()area.box=Rectangle(100,100,200,80)area.page_number=0area.background_color=Color.yellow.to_argb()area.message="Please review"reply=Reply()reply.comment="Confirmed, looks good"area.replies=[reply]# A text highlight described by a quad of pointshighlight=HighlightAnnotation()highlight.page_number=0highlight.font_color=Color.lime.to_argb()highlight.points=[Point(80,730),Point(240,730),Point(240,750),Point(80,750)]annotator.add([area,highlight])# Render only area annotations, and only the first pageoptions=SaveOptions()options.annotation_types=AnnotationType.AREAoptions.first_page=1# SaveOptions pages are 1-basedoptions.last_page=1annotator.save("./annotated.pdf",save_options=options)if__name__=="__main__":annotate_with_options()
sample.pdf is the sample file used in this example. Click here to download it.