fromgroupdocs.annotationimportAnnotatordefget_all_annotations():# Open a document that already contains annotations and list themwithAnnotator("./annotated.pdf")asannotator:annotations=annotator.get()print(f"Found {len(annotations)} annotation(s):")forannotationinannotations:print(f" [{annotation.id}] {type(annotation).__name__}: {annotation.message}")if__name__=="__main__":get_all_annotations()
get
Returns a collection of document annotations filtered by the specified annotation type.
defget(self,type):...
Parameter
Type
Description
type
AnnotationType
The annotation type that must be returned.
Returns: list[GroupDocs.Annotation.Annotation]: The list of annotations of the specified type.
fromgroupdocs.annotationimportAnnotatordefget_all_annotations():# Open a document that already contains annotations and list themwithAnnotator("./annotated.pdf")asannotator:annotations=annotator.get()print(f"Found {len(annotations)} annotation(s):")forannotationinannotations:print(f" [{annotation.id}] {type(annotation).__name__}: {annotation.message}")if__name__=="__main__":get_all_annotations()