AreaAnnotation class
Leave feedback
On this page
Represents area annotation properties.
Learn more
- More about annotation types and annotating PDF and Microsoft Word documents, Excel spreadsheets and PowerPoint Presentations: https://docs.groupdocs.com/display/annotationnet/Add+annotation+to+the+document
- More about adding area annotations to documents of various types: https://docs.groupdocs.com/display/annotationnet/Add+area+annotation
The AreaAnnotation type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes new instance of AreaAnnotation class. |
| Method | Description |
|---|---|
| clone | Returns a new instance of the area annotation with the same values. |
| equals | Compares area annotation using the IEquatable Equals method. |
| equals | Compares area annotation using the standard object Equals method. |
| equals_area_annotation | |
| equals_object | |
| get_hash_code | Returns the hash code of the AreaAnnotation instance. |
| equals_annotation_base | (inherited from AnnotationBase) |
| Property | Description |
|---|---|
| background_color | The background color of the area annotation. |
| box | The area annotation position. |
| opacity | The opacity of the area annotation. |
| pen_color | The pen color of the area annotation. |
| pen_style | The pen style of the area annotation. |
| pen_width | The pen width of the area annotation. |
| created_on | The annotation creation date. (inherited from AnnotationBase) |
| id | The annotation unique identifier. This field is auto-incremented. (inherited from AnnotationBase) |
| message | The annotation message. (inherited from AnnotationBase) |
| page_number | The page number where the annotation should be located. (inherited from AnnotationBase) |
| replies | The list of replies (comments) attached to the annotation. (inherited from AnnotationBase) |
| state_before_annotation | The previous state of the text before annotating. (inherited from AnnotationBase) |
| type | The annotation type. (inherited from AnnotationBase) |
| user | The annotation author. (inherited from AnnotationBase) |
from groupdocs.annotation import Annotator
from groupdocs.annotation.models import Rectangle
from groupdocs.annotation.models.annotation_models import AreaAnnotation
from groupdocs.pydrawing import Color
area = AreaAnnotation()
area.box = Rectangle(100, 100, 200, 80)
area.background_color = Color.yellow.to_argb()
area.pen_color = Color.red.to_argb()
area.opacity = 0.7
area.page_number = 0
area.message = "Flagged region"
with Annotator("document.pdf") as annotator:
annotator.add(area)
annotator.save("annotated.pdf")
Task guides that use AreaAnnotation:
- AI agents and LLM integration
- Loading documents
- Saving documents
- Add annotations
- Comments and replies
- Hello, World!
- GroupDocs.Annotation for Python via .NET Overview
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.