UnderlineAnnotation class
Leave feedback
On this page
Represents underline 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 underline annotations to documents of various types: https://docs.groupdocs.com/display/annotationnet/Add+underline+annotation
The UnderlineAnnotation type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new UnderlineAnnotation instance. |
| Method | Description |
|---|---|
| clone | Returns new instance with the same values. |
| equals | Compares this underline annotation with another underline annotation. |
| equals | Compares underline annotation using the standard object Equals method. |
| equals_object | |
| equals_underline_annotation | |
| get_hash_code | Returns HashCode of the underline annotation. |
| equals_annotation_base | (inherited from AnnotationBase) |
| Property | Description |
|---|---|
| background_color | The underline annotation text background color. |
| font_color | The text color of the underline annotation. |
| opacity | The underline annotation opacity. |
| points | The collection of points that describe rectangles with text. |
| underline_color | The underline annotation color as an ARGB integer. |
| 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 Point
from groupdocs.annotation.models.annotation_models import UnderlineAnnotation
from groupdocs.pydrawing import Color
def add_underline_annotation():
with Annotator("./sample.pdf") as annotator:
underline = UnderlineAnnotation()
underline.points = [
Point(80, 600), Point(300, 600),
Point(80, 575), Point(300, 575),
]
underline.underline_color = Color.red.to_argb()
underline.opacity = 0.9
underline.page_number = 0
underline.message = "This is an underline annotation"
annotator.add(underline)
annotator.save("./output.pdf")
Task guides that use UnderlineAnnotation:
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.