Annotator class
Annotator class
The Annotator class is the central component of the GroupDocs.Annotation API, designed to manage and facilitate the document annotation process across various formats.
Learn more
- More about GroupDocs.Annotation features: GroupDocs.Annotation Developer Guide (https://docs.groupdocs.com/display/annotationnet/Developer+Guide)
The Annotator type exposes the following members:
Constructors
| Constructor | Description |
|---|---|
| init | Initializes annotator class which accepts a document path. |
| init | Initializes annotator class which accepts document path and options. |
| init | Initializes annotator class which accepts document path and settings. |
| init | Initializes annotator class which accept document path, options and settings. |
| init | Initializes annotator class which accepts a document stream. |
| init | Initializes annotator class which accepts a document stream and options. |
| init | Initializes annotator class which accepts a document stream and settings. |
| init | Initializes annotator class which accepts a document stream, load options, and settings. |
Methods
| Method | Description |
|---|---|
| add | Adds annotation to document. |
| add | Adds a collection of annotations to a document. |
| add_annotation_base | |
| add_list | |
| dispose | Dispose. |
| export_annotations_to_xml_file | Exports annotations from the document to an XML file. |
| export_annotations_to_xml_file_file | |
| export_annotations_to_xml_file_string | |
| get | Gets collections of document annotations. |
| get | Returns a collection of document annotations filtered by the specified annotation type. |
| get_annotation_type | |
| get_version | Retrieves annotations from a specific version. |
| get_version_object | |
| get_versions_list | Retrieves the list of versions. |
| import_annotations_from_xml_file | Export annotations from XML file. |
| import_annotations_from_xml_file_file | |
| import_annotations_from_xml_file_string | |
| remove | Removes an annotation from the document by its identifier. |
| remove | Removes an annotation from the document. |
| remove | Removes a collection of annotations from the document using the provided annotation IDs. |
| remove | Removes collection of annotations from document. |
| remove_annotation_base | |
| remove_int32 | |
| remove_list | |
| save | Saves document after adding, updating or removing annotations. |
| save | Saves the document after adding, updating, or removing annotations. |
| save | Saves document after adding, updating or removing annotations. |
| save | Saves the document after adding, updating, or removing annotations. |
| save | Saves document after adding, updating or removing annotations. |
| save | Saves document after adding, updating or removing annotations. |
| save_file | |
| save_save_options | |
| save_stream | |
| save_streams | |
| save_string | |
| update | Updates document annotation by id. |
| update | Updates collection of document annotations by overriding the previous list with a new one. |
| update_annotation_base | |
| update_list |
Properties
| Property | Description |
|---|---|
| document | The document contains various information about the uploaded document. |
| process_pages | The count of processed pages. |
| rotation | The document rotation angle. |
Example
from groupdocs.annotation import Annotator
def export_annotations_to_xml():
with Annotator("./annotated.pdf") as annotator:
annotator.export_annotations_to_xml_file(output_path="./exported_annotations.xml")
print("Exported annotations to ./exported_annotations.xml.")
Guides
Task guides that use Annotator:
- AI agents and LLM integration
- Generate document preview
- Loading documents
- Saving documents
- Add annotations
- Comments and replies
- Import and export annotations
- Manage annotations
- Hello, World!
- GroupDocs.Annotation for Python via .NET Overview
See Also
- module
groupdocs.annotation