Class: TextMarkupAnnotation
Experimental
Base class for text markup annotations
Extends
Constructors
new TextMarkupAnnotation()
new TextMarkupAnnotation(
options):TextMarkupAnnotation
Experimental
Parameters
• options: TextMarkupAnnotationOptions
Options used to initialize annotation.
Returns
Overrides
Accessors
__annotation
get__annotation():TextMarkupAnnotation
Experimental
set__annotation(v):void
Experimental
Parameters
• v: TextMarkupAnnotation
Returns
TextMarkupAnnotation
Overrides
author
getauthor():string
Experimental
The author.
setauthor(author):void
Experimental
Parameters
• author: string
Returns
string
Inherited from
blendMode
getblendMode():BlendMode
Experimental
blend mode
setblendMode(blendMode):void
Experimental
Parameters
• blendMode: BlendMode
Returns
Inherited from
boundingBox
getboundingBox():Rectangle<PdfPoint>
Experimental
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.
setboundingBox(rectangle):void
Experimental
Parameters
• rectangle: Rectangle<PdfPoint>
Returns
Rectangle<PdfPoint>
Inherited from
content
getcontent():string
Experimental
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.
setcontent(content):void
Experimental
Parameters
• content: string
Returns
string
Inherited from
creationDate
getcreationDate():Date
Experimental
The date and time when the annotation was created.
This property retrieves the creation date from the annotation and converts it to a JavaScript Date object.
Returns
Date
The creation date as a JavaScript Date object, or null if no
creation date is available in the annotation.
Inherited from
dateModified
getdateModified():Date
Experimental
The date and time when the annotation was most recently modified.
setdateModified(date):void
Experimental
Parameters
• date: Date
Returns
Date
Inherited from
fillColor
getfillColor():RgbColor
Experimental
Retrieves the fill color used in the annotation.
setfillColor(v):void
Experimental
Sets the fill color for the annotation.
Parameters
• v: RgbColor
The new RgbColor to apply to the annotation.
Returns
The RgbColor representing the annotation’s fill color.
hasChanges
gethasChanges():boolean
Experimental
Indicates if the annotation has been changed since the document was opened
Returns
boolean
Inherited from
hidden
gethidden():boolean
Experimental
If set to true, the annotation will not be displayed or printed, and it will not allow interaction with the user.
sethidden(hidden):void
Experimental
Parameters
• hidden: boolean
Returns
boolean
Inherited from
id
getid():void
Experimental
A unique identifier for the annotation.
Returns
void
Inherited from
interactive
getinteractive():boolean
Experimental
Specifies whether the annotation allows user interaction.
setinteractive(interactive):void
Experimental
Parameters
• interactive: boolean
Returns
boolean
Inherited from
isAdded
getisAdded():boolean
Experimental
Indicates whether the annotation was added to a page
Returns
boolean
Inherited from
isMaintainingAspectRatio
getisMaintainingAspectRatio():boolean
Experimental
Indicates if the annotation is maintaining its aspect ratio
Returns
boolean
Overrides
MarkupAnnotation.isMaintainingAspectRatio
isMarkupAnnotation
getisMarkupAnnotation():boolean
Experimental
Indicates if the annotation is a markup annotation
Returns
boolean
Inherited from
MarkupAnnotation.isMarkupAnnotation
isModified
getisModified():boolean
Experimental
Indicates if the annotation has changes that have not yet been saved to the document
Returns
boolean
Inherited from
isMoveable
getisMoveable():boolean
Experimental
Indicates if the annotation can be moved by the user
Returns
boolean
Overrides
isResizable
getisResizable():boolean
Experimental
Indicates if the annotation can be resized by the user
Returns
boolean
Overrides
isRotatable
getisRotatable():boolean
Experimental
Indicates if the annotation can be rotated by the user
Returns
boolean
Overrides
isSelectable
getisSelectable():boolean
Experimental
Indicates if the annotation can be selected by the user
Returns
boolean
Overrides
isWidgetAnnotation
getisWidgetAnnotation():boolean
Experimental
Indicates if the annotation is a widget annotation
Returns
boolean
Inherited from
MarkupAnnotation.isWidgetAnnotation
locked
getlocked():AnnotationLockedState
Experimental
Represents the locked state of the annotation.
setlocked(locked):void
Experimental
Parameters
• locked: AnnotationLockedState
Returns
Inherited from
modificationDate
getmodificationDate():Date
Experimental
The date and time when the annotation was last modified.
This property will retrieve the modification date from the annotation and convert it to a JavaScript Date object.
Returns
Date
The modification date as a JavaScript Date object, or null if no
modification date is available in the annotation.
Inherited from
MarkupAnnotation.modificationDate
opacity
getopacity():number
Experimental
Annotation opacity
setopacity(opacity):void
Experimental
Parameters
• opacity: number
Returns
number
Inherited from
page
getpage():Page
Experimental
Page in which the annotation is embedded.
setpage(page):void
Experimental
Set the page in which the annotation is embedded.
Parameters
• page: Page
The page to set as the annotation’s page.
Returns
Inherited from
pageNumber
getpageNumber():number
Experimental
Number of the page in which the annotation is embedded.
Returns
number
Inherited from
privateData
getprivateData():object
Experimental
Custom data to be stored with the annotation
setprivateData(privateData):void
Experimental
Parameters
• privateData: object
Returns
object
Inherited from
renderProperties
getrenderProperties():AnnotationRenderProperties
Experimental
Object which encapsulates the rendering properties of a PDF annotation, providing a set of flags that control its visibility, interactivity, and other rendering behaviors.
setrenderProperties(v):void
Experimental
Parameters
• v: AnnotationRenderProperties
Returns
Inherited from
MarkupAnnotation.renderProperties
source
getsource():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
Inherited from
subject
getsubject():string
Experimental
The subject.
setsubject(subject):void
Experimental
Parameters
• subject: string
Returns
string
Inherited from
subtype
getsubtype():TextMarkupType
Experimental
Retrieves the type of markup applied by this annotation.
Returns
TextMarkupType
The TextMarkupType representing how the text is marked, such as highlight, underline, strikethrough, or squiggly.
textMarkupArea
gettextMarkupArea():Quadrilateral<PdfPoint>[]
Experimental
Retrieves the area marked by this annotation.
This represents the set of quadrilateral regions that highlight or mark portions of text within the document.
Returns
Quadrilateral<PdfPoint>[]
An array of Quadrilateral defining the marked-up area.
type
gettype():AnnotationType
Experimental
The PDF annotation type
Returns
Overrides
underlyingText
getunderlyingText():string
Experimental
Retrieves the text associated with the text markup annotation as a string.
Remarks
This method provides a convenient way to access the text marked by the annotation, but it does not directly originate from the annotation object within the PDF structure. Due to potential complexities such as overlapping texts or watermarks, the returned string might not always precisely match the visually selected content.
Returns
string
The text associated with the annotation.
Methods
dispose()
dispose():
void
Experimental
Returns
void