If so you can download any of the below versions for testing. The product will function as normal except for an evaluation limitation. At the time of purchase we provide a license file via email that will allow the product to work in its full capacity. If you would also like an evaluation license to test without any restrictions for 30 days, please follow the directions provided here.
If you experience errors, when you try to download a file, make sure your network policies (enforced by your company or ISP) allow downloading ZIP and/or MSI files.
Installation
The package is available at pypi.org and it can be installed via pip
by executing following command:
pip install groupdocs-annotation-cloud
Cloud Document Annotation Python SDK
GroupDocs.Annotation Cloud API offers a comprehensive Python SDK for seamless document annotation. Easily integrate functionalities like adding comments, highlights, watermarks, and redactions to various document formats, including PDF, Word, Excel, and PowerPoint, within your Python applications.
Document Annotations
Text Annotations
Add comments or explanations within the text.
Area Annotations
Highlight specific areas of a document for detailed notes.
Point Annotations
Mark specific points of interest in a document.
Arrow Annotations
Direct viewers’ attention to specific elements with arrow markers.
Strikeout/Underline Annotations
Highlight text by striking through or underlining it for easy referencing.
Markup Features
Highlighting
Mark important sections of the text with highlights.
Redaction
Completely hide or censor sensitive content within documents.
Watermarking
Protect document integrity by adding watermarks to indicate ownership or status.
Annotation Management
Edit Annotations
Modify or update existing annotations in documents.
Delete Annotations
Remove unnecessary or outdated annotations.
Export Annotations
Extract and export annotations to store separately or share with others.
Collaboration Features
Enable multi-user collaboration with thread-based commenting features.
Version Control
Keep track of changes made to annotations with versioning tools.
Real-Time Updates
Implement real-time updates when multiple users are working on the same document.
Security Features
Access Control
Secure document annotations with user-based access control.
Role-Based Permissions
Assign different permission levels to users to protect sensitive annotations.
Encryption
Ensure that data is securely encrypted during document transfer and storage.
Advanced Features
Combine Annotations
Merge multiple annotations into one document.
Layered Annotations
Add and manipulate layered annotations to give flexibility in redacting and marking documents.
Custom Annotation Styles
Set custom colors, opacity, and size for annotations.
API Integration
Seamless integration with other systems and applications using REST APIs.
Scalable Infrastructure
Supports high-load environments with scalable architecture.
Supported Annotation Types and Features
Area Annotation
- Mark up an area within the document page with a rectangle.
- Allows users to highlight a specific region on a document.
- Box dimensions can be customized to fit the area of interest.
- Supports replies to annotations for collaborative reviews.
- The area annotation can include additional comments.
Distance Annotation
- Measures the distance between objects in a document.
- Enables precise measurements within document content.
- Coordinates and dimensions can be defined for exact measurements.
- Useful for architectural and engineering documents where distance measures are critical.
Ellipse Annotation
- Draws elliptic annotations on a document page.
- Enables users to highlight circular or elliptic areas.
- Customizable radius, color, and opacity for clear visibility.
- Supports multiple replies for added comments on the marked area.
Image Annotation
- Adds an image to a specific area of the document.
- Inserts images within a document page for visual reference.
- Supports positioning and resizing of images.
- Useful for adding logos, stamps, or visual marks.
Link Annotation
- Adds a hyperlink to a document.
- Links specific text or areas of the document to external URLs.
- Provides support for web navigation or referencing additional resources.
- Can be styled with different colors to differentiate from the text.
Multiple Annotation
- Allows adding multiple types of annotations simultaneously.
- Supports adding a combination of annotations (e.g., text, images, shapes) at once.
- Useful for reviewing documents where different annotation types are needed on the same page.
- Multiple annotations can be grouped or treated separately.
Point Annotation
- Sticks comments to a specific point in the document.
- Comments are associated with a specific point or location within the document.
- Ideal for collaborative document reviews where pinpointing feedback is necessary.
- Supports color and size adjustments for better visibility.
Polyline Annotation
- Draws connected lines to form a polyline in a document.
- Used for drawing complex shapes or marking specific paths in a document.
- Supports multiple points connected by straight lines.
- Allows customization of line thickness, color, and opacity.
Resource Redaction Annotation
- Fills a black rectangle in a fixed position to hide sensitive information.
- Effectively redacts confidential information from documents.
- The black box can be sized and positioned over any sensitive data.
- Commonly used for legal documents, financial statements, or personal identification numbers (PINs).
Squiggly Annotation
- Adds a wavy underline to mark text.
- Highlights text with a squiggly underline for attention.
- Ideal for marking spelling or grammatical errors.
- Color and line style can be adjusted to differentiate from other annotations.
File Format | Description | Annotate |
---|
DOC , DOCX | Word® Document | ✔️ |
OTT | Open Document Standard Format | ✔️ |
ODT | Open Document Text File Format | ✔️ |
DOCM | Microsoft Word® Open XML Macro-Enabled Document | ✔️ |
DOT | Word® Document Template File | ✔️ |
DOTX | Word® Open XML Document Template | ✔️ |
DOTM | Word® Open XML Macro-Enabled Template File | ✔️ |
RTF | Rich Text File Format | ✔️ |
TXT | Plain Text File Format | ✔️ |
PDF | Portable Document Format | ✔️ |
PPT , PPTX | Presentation Document Format | ✔️ |
PPSX | PowerPoint Open XML Slide Show | ✔️ |
ODP | OpenDocument Presentation File Format | ✔️ |
OTP | OpenDocument Presentation Template | ✔️ |
XLS , XLSX | Cells Document Format | ✔️ |
XLSB | Microsoft Excel® Binary Spreadsheet File | ✔️ |
XLSX | Microsoft Excel® Open XML Spreadsheet | ✔️ |
DICOM | Digital Imaging and Communication in Medicine | ✔️ |
DJVU | DjVu Format | ✔️ |
EMF /WMF | Enhanced MetaFile / Windows MetaFile | ✔️ |
CAD | Computer-Aided Design | ✔️ |
EML /EMLX | Email Markup Language | ✔️ |
HTML | Hypertext Markup Language | ✔️ |
MHTML | MIME HTML File | ✔️ |
JPEG | Joint Photographic Experts Group | ✔️ |
TIFF | Tagged Image File Format | ✔️ |
BMP | Bitmap | ✔️ |
GIF (static images without animation) | Graphics Interchange Format | ✔️ |
VSD | Microsoft Visio® Drawing | ✔️ |
VDX | Microsoft Visio® XML File Format | ✔️ |
VSS | Microsoft Visio® Stencil File Format | ✔️ |
VSDM | Microsoft Visio® Macro-Enabled Drawing File | ✔️ |
MSG | Email Message | ✔️ |
Getting Started GroupDocs.Annotation Cloud Python SDK
Requirements
Python 2.7 or 3.4+
Installation
Install groupdocs-annotation-cloud
with PIP from PyPI by:
pip install groupdocs-annotation-cloud
Or clone repository and install it via Setuptools:
Please follow the installation procedure and then run following:
# Import module
import groupdocs_annotation_cloud
# Get your app_sid and app_key at https://dashboard.groupdocs.cloud (free registration is required).
app_sid = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
app_key = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
# Create instance of the API
api = groupdocs_annotation_cloud.InfoApi.from_keys(app_sid, app_key)
try:
# Retrieve supported file-formats
response = api.get_supported_file_formats()
# Print out supported file-formats
print("Supported file-formats:")
for format in response.formats:
print('{0} ({1})'.format(format.file_format, format.extension))
except groupdocs_annotation_cloud.ApiException as e:
print("Exception when calling get_supported_file_formats: {0}".format(e.message))
GroupDocs.Annotation Cloud API Data Models
FilesUploadResult
, Error
, ErrorDetails
, FilesList
, StorageFile
, StorageExist
, ObjectExist
, DiscUsage
, FileVersions
, FileVersion
, AnnotationInfo
, Rectangle
, Point
, AnnotationReplyInfo
, FileInfo
, AnnotationApiLink
, Link
, RemoveOptions
, AnnotateOptions
, FormatsResult
, Format
, DocumentInfo
, PageInfo
, ConsumptionResult
, PageImages
, PageImage
, LinkElement
, PreviewOptions
Python Code Sample 1: Add Text Annotation
This code sample demonstrates how to add a text annotation to a document using GroupDocs.Annotation Cloud SDK for Python. The text annotation is customizable in terms of position, font, and color.
# For complete examples and data files, please go to https://github.com/groupdocs-annotation-cloud/groupdocs-annotation-cloud-python-samples
import groupdocs_annotation_cloud
app_sid = "XXXX-XXXX-XXXX-XXXX" # Get AppKey and AppSID from https://dashboard.groupdocs.cloud
app_key = "XXXXXXXXXXXXXXXX" # Get AppKey and AppSID from https://dashboard.groupdocs.cloud
api = groupdocs_annotation_cloud.AnnotateApi.from_keys(app_sid, app_key)
a1 = groupdocs_annotation_cloud.AnnotationInfo()
a1.annotation_position = groupdocs_annotation_cloud.Point()
a1.annotation_position.x = 1
a1.annotation_position.y = 1
a1.box = groupdocs_annotation_cloud.Rectangle()
a1.box.x = 100
a1.box.y = 100
a1.box.width = 200
a1.box.height = 100
a1.page_number = 0
a1.font_color = 1201033
a1.font_size = 12
a1.opacity = 0.7
a1.type = "TextField"
a1.text = "Text field text"
a1.creator_name = "Anonym A."
file_info = FileInfo()
file_info.file_path = "annotationdocs\\one-page.docx"
options = AnnotateOptions()
options.file_info = file_info
options.annotations = [a1]
options.output_path = "Output\\output.docx"
request = AnnotateRequest(options)
result = api.annotate(request)
print("AddTextFieldAnnotation: Text Field Annotation added: " + result['href'])
Python Code Sample 2: Add Area Annotation
This code sample demonstrates how to add an area annotation (highlighting a section of a document).
# For complete examples and data files, please go to https://github.com/groupdocs-annotation-cloud/groupdocs-annotation-cloud-python-samples
import groupdocs_annotation_cloud
app_sid = "XXXX-XXXX-XXXX-XXXX" # Get AppKey and AppSID from https://dashboard.groupdocs.cloud
app_key = "XXXXXXXXXXXXXXXX" # Get AppKey and AppSID from https://dashboard.groupdocs.cloud
api = groupdocs_annotation_cloud.AnnotateApi.from_keys(app_sid, app_key)
a1 = groupdocs_annotation_cloud.AnnotationInfo()
a1.annotation_position = groupdocs_annotation_cloud.Point()
a1.annotation_position.x = 1
a1.annotation_position.y = 1
a1.box = groupdocs_annotation_cloud.Rectangle()
a1.box.x = 100
a1.box.y = 100
a1.box.width = 200
a1.box.height = 100
a1.page_number = 0
a1.pen_color = 1201033
a1.pen_style = "Solid"
a1.pen_width = 1
a1.opacity = 0.7
a1.type = "Area"
a1.text = "This is area annotation"
a1.creator_name = "Anonym A."
file_info = FileInfo()
file_info.file_path = "annotationdocs\\one-page.docx"
options = AnnotateOptions()
options.file_info = file_info
options.annotations = [a1]
options.output_path = "Output\\output.docx"
request = AnnotateRequest(options)
result = api.annotate(request)
print("AddAreaAnnotation: Area Annotation added: " + result['href'])
Python Code Sample 3: Remove Annotation
This code sample demonstrates how to remove an annotation from a document.
# For complete examples and data files, please go to https://github.com/groupdocs-annotation-cloud/groupdocs-annotation-cloud-python-samples
import groupdocs_annotation_cloud
app_sid = "XXXX-XXXX-XXXX-XXXX" # Get AppKey and AppSID from https://dashboard.groupdocs.cloud
app_key = "XXXXXXXXXXXXXXXX" # Get AppKey and AppSID from https://dashboard.groupdocs.cloud
api = groupdocs_annotation_cloud.AnnotateApi.from_keys(app_sid, app_key)
file_info = FileInfo()
file_info.file_path = "annotationdocs\\input.docx"
options = RemoveOptions()
options.file_info = file_info
options.annotation_ids = [1, 2, 3]
options.output_path = "Output\\output.docx"
request = RemoveAnnotationsRequest(options)
result = api.remove_annotations(request)
print("RemoveAnnotations: Annotations removed: " + result['href'])