UnderlineAnnotation class

UnderlineAnnotation class

Represents underline annotation properties.

Learn more

The UnderlineAnnotation type exposes the following members:

Constructors

Constructor Description
init Initializes a new UnderlineAnnotation instance.

Methods

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)

Properties

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)

Example

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")

Guides

Task guides that use UnderlineAnnotation:

See Also