PointAnnotation class

PointAnnotation class

Represents point annotation properties.

Learn more

The PointAnnotation type exposes the following members:

Constructors

Constructor Description
init Initializes a new PointAnnotation instance.

Methods

Method Description
clone Returns new instance with the same values.
equals Compares point annotation using IEquatable Equals method.
equals Compares point annotation using standard object Equals method.
equals_object
equals_point_annotation
get_hash_code Returns HashCode of the point annotation.
equals_annotation_base (inherited from AnnotationBase)

Properties

Property Description
box The point annotation position.
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 Rectangle
from groupdocs.annotation.models.annotation_models import PointAnnotation


def add_point_annotation():
    with Annotator("./sample.pdf") as annotator:
        point = PointAnnotation()
        point.box = Rectangle(100, 100, 0, 0)   # a point is positioned by its box origin
        point.page_number = 0
        point.message = "This is a point annotation"
        annotator.add(point)
        annotator.save("./output.pdf")


if __name__ == "__main__":
    add_point_annotation()

Guides

Task guides that use PointAnnotation:

See Also