get method
Contents
[
Hide
]
get
Gets collections of document annotations.
Learn more:
- More about how to get document annotations collection: How to get document annotations in C# (https://docs.groupdocs.com/display/annotationnet/Extract+annotations+from+document)
def get(self):
...
Returns: The list of annotations.
Example
from groupdocs.annotation import Annotator
def get_all_annotations():
# Open a document that already contains annotations and list them
with Annotator("./annotated.pdf") as annotator:
annotations = annotator.get()
print(f"Found {len(annotations)} annotation(s):")
for annotation in annotations:
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.
def get(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.
- Learn more: More about how to get document annotations collection: https://docs.groupdocs.com/display/annotationnet/Extract+annotations+from+document
Example
from groupdocs.annotation import Annotator
def get_all_annotations():
# Open a document that already contains annotations and list them
with Annotator("./annotated.pdf") as annotator:
annotations = annotator.get()
print(f"Found {len(annotations)} annotation(s):")
for annotation in annotations:
print(f" [{annotation.id}] {type(annotation).__name__}: {annotation.message}")
if __name__ == "__main__":
get_all_annotations()
See Also
- class
Annotator