Class: abstract
Annotation
Base class for all annotations.
Extended by
Implements
Constructors
new Annotation()
new Annotation(
options
):Annotation
Creates a new Annotation
instance.
Parameters
• options: AnnotationOptions
Options used to initialize annotation.
Returns
Accessors
__annotation
get
__annotation():Annotation
set
__annotation(v
):void
Parameters
• v: Annotation
Returns
Annotation
boundingBox
get
boundingBox():Rectangle
<PdfPoint
>
Represents the bounding box of the annotation, which defines its position and size on the page.
The bounding box is specified as a Rectangle
of PdfPoint
coordinates.
set
boundingBox(rectangle
):void
Parameters
• rectangle: Rectangle
<PdfPoint
>
Returns
Rectangle
<PdfPoint
>
content
get
content():string
Text that shall be displayed for the annotation or, if this type of annotation does not display text, an alternative description of the annotation’s contents in human-readable form.
set
content(content
):void
Parameters
• content: string
Returns
string
dateModified
get
dateModified():Date
Experimental
The date and time when the annotation was most recently modified.
set
dateModified(date
):void
Parameters
• date: Date
Returns
Date
hasChanges
get
hasChanges():boolean
Experimental
Indicates if the annotation has been changed since the document was opened
Returns
boolean
hidden
get
hidden():boolean
If set to true, the annotation will not be displayed or printed, and it will not allow interaction with the user.
set
hidden(hidden
):void
Parameters
• hidden: boolean
Returns
boolean
id
get
id():void
Experimental
A unique identifier for the annotation.
Returns
void
interactive
get
interactive():boolean
Specifies whether the annotation allows user interaction.
set
interactive(interactive
):void
Parameters
• interactive: boolean
Returns
boolean
isAdded
get
isAdded():boolean
Experimental
Indicates whether the annotation was added to a page
Returns
boolean
isMaintainingAspectRatio
get
abstract
isMaintainingAspectRatio():boolean
Indicates if the annotation is maintaining its aspect ratio
Returns
boolean
isMarkupAnnotation
get
abstract
isMarkupAnnotation():boolean
Indicates if the annotation is a markup annotation
Returns
boolean
isModified
get
isModified():boolean
Experimental
Indicates if the annotation has changes that have not yet been saved to the document
Returns
boolean
isMoveable
get
abstract
isMoveable():boolean
Indicates if the annotation can be moved by the user
Returns
boolean
isResizable
get
abstract
isResizable():boolean
Indicates if the annotation can be resized by the user
Returns
boolean
isRotatable
get
abstract
isRotatable():boolean
Indicates if the annotation can be rotated by the user
Returns
boolean
isSelectable
get
abstract
isSelectable():boolean
Indicates if the annotation can be selected by the user
Returns
boolean
isWidgetAnnotation
get
abstract
isWidgetAnnotation():boolean
Indicates if the annotation is a widget annotation
Returns
boolean
locked
get
locked():AnnotationLockedState
Represents the locked state of the annotation.
set
locked(locked
):void
Parameters
• locked: AnnotationLockedState
Returns
page
get
page():Page
Page in which the annotation is embedded.
set
page(page
):void
Set the page in which the annotation is embedded.
Parameters
• page: Page
The page to set as the annotation’s page.
Returns
pageNumber
get
pageNumber():number
Experimental
Number of the page in which the annotation is embedded.
Returns
number
privateData
get
privateData():object
Experimental
Custom data to be stored with the annotation
set
privateData(privateData
):void
Parameters
• privateData: object
Returns
object
renderProperties
get
renderProperties():AnnotationRenderProperties
Object which encapsulates the rendering properties of a PDF annotation, providing a set of flags that control its visibility, interactivity, and other rendering behaviors.
set
renderProperties(v
):void
Parameters
• v: AnnotationRenderProperties
Returns
source
get
source():void
Experimental
Tag that identifies the source the annotation is coming from, if
the source is an input PDF or an input FDF.
Newly created annotations always return null
.
Returns
void
type
get
abstract
type():AnnotationType
The PDF annotation type
Returns
Methods
dispose()
dispose():
void
Disposes of the object, releasing any resources it holds.
The dispose
method is responsible for performing cleanup operations and releasing
any resources acquired by the object. Once an object is disposed, it should not
be used, and attempts to do so may result in undefined behavior.
Returns
void