FoxitPDFSDKforWeb  8.2.0
Foxit PDF SDK for Web
Markup Class Reference

Markup annot object. More...

Inheritance diagram for Markup:
Annot Caret Circle FileAttachment FreeText Ink Line Note Polygon PolyLine Redact Sound Square Stamp TextMarkup

Public Member Functions

 addMarkedState (stateName)
 Add marked state with specific name [Support in Server] More...
 
 addReply (content)
 Add a new reply to the end of reply list. [Support in Server] More...
 
 addReviewState (stateName)
 Add review state with specific name. [Support in Server] More...
 
 exportToJSON ()
 Export annotation to a json object. [Support in Server] Override Annot::exportToJSON. More...
 
 getCreateDateTime ()
 Get creation date time. [Support in Server] More...
 
 getGroupElements ()
 Get the group annotations which own current annotation. [Support in Server] More...
 
 getGroupHeader ()
 Get the header annotation (as primary annotation) of the group that current markup annotation belongs to. [Support in Server] More...
 
 getIntent ()
 Get intent name.
Following annotation types have predefined intent name: More...
 
 getMarkedState (index)
 Get a state annotation by index. state model is marked [Support in Server] More...
 
 getMarkedStateCount ()
 Get the count of state annotations. [Support in Server] More...
 
 getMarkedStates ()
 Get all state annotation. state model is marked [Support in Server] More...
 
 getOpacity ()
 Get opacity value.
This property has effect on markup annotation's appearance. [Support in Server] More...
 
 getPopup ()
 Get annotation's popup. [Support in Server] More...
 
 getReplies ()
 Get all replies [Support in Server] More...
 
 getReply (index)
 Get a reply annot by index. [Support in Server] More...
 
 getReplyCount ()
 Count all replies. [Support in Server] More...
 
 getReviewState (index)
 Get a state annotation by index. state model is review [Support in Server] More...
 
 getReviewStateCount ()
 Get the count of state annotations. [Support in Server]
When state model is review, the markup annotation can have several state annotations in a chain: first state annotation refers to the markup annotation, second state annotation refers to the first state annotation, etc. Just like this: markup annotation <– reviewed state1 <– reviewed state2 ... More...
 
 getReviewStates ()
 Get all state annotation. state model is review [Support in Server] More...
 
 getSubject ()
 Get subject string. [Support in Server] More...
 
 getTitle ()
 Get title string. [Support in Server] More...
 
 isGrouped ()
 Check whether current markup annotation is in a group or not. [Support in Server] More...
 
 isGroupHeader ()
 Check whether current markup annotation is a group header annotation. [Support in Server] More...
 
 removeAllStateAnnots ()
 Remove all sate from this markup annotation. [Support in Server] More...
 
 setContent (content)
 Set markup annotation's contents. [Support in Server] More...
 
 setCreateDateTime (date)
 Set creation date time. [Support in Server] More...
 
 setIntent (intent)
 Set annotaions's intent. More...
 
 setOpacity (opacity)
 Set opacity value. [Support in Server] More...
 
 setSubject (subject)
 Set subject string. [Support in Server] More...
 
 setTitle (title)
 Set title string. [Support in Server] More...
 
- Public Member Functions inherited from Annot
 exportToJSON ()
 Export the current annotation to a Json object. [Support in Server] More...
 
 getBorderColor ()
 Get annotation's border color. [Support in Server] More...
 
 getBorderInfo ()
 Get annotation's border information. [Support in Server] More...
 
 getContent ()
 Get annotation's contents. [Support in Server] More...
 
 getDictionaryEntry (key)
 Get the dictionary property of Annot by key. More...
 
 getFlags ()
 Get annotation's flag. [Support in Server] More...
 
 getModifiedDateTime ()
 Get annotation's last modified date time. [Support in Server] More...
 
 getObjectNumber ()
 Get annotation's object number. More...
 
 getPage ()
 Get annotation's page. [Support in Server] More...
 
 getRect ()
 Get annotation's rect. [Support in Server] More...
 
 getTitle ()
 Get annotation's title. [Support in Server] More...
 
 getType ()
 Get annotation's type. [Support in Server] More...
 
 getUniqueID ()
 Get annotation's unique ID. [Support in Server] More...
 
 isEmpty ()
 Check annotation is empty or not. [Support in Server] More...
 
 isMarkup ()
 Check if current annotation is a markup annotation. [Support in Server] More...
 
 setBorderColor (borderColor)
 Set annotation's border color. [Support in Server] More...
 
 setBorderInfo (borderInfo)
 Set annotation's border information. [Support in Server] More...
 
 setContent (content)
 Set contents for the currently gotten annotation. [Support in Server] More...
 
 setDictionaryEntry (key, value)
 Add a new entry or replace the existing entry of the annotation dictionary. Caller could use this method to store their private data to the annotation. Do not use any standard key of the annotation dictionary, such as 'Type', 'Subtype', 'Rect' defined in PDF Reference. If any standard key is used, this behaviour will be undefined. More...
 
 setFlags (flag, notTriggerEvent)
 Set annotation's flag. [Support in Server] More...
 
 setModifiedDateTime (date)
 Set annotation's last modified date time. [Support in Server] More...
 

Detailed Description

Markup annot object.

Member Function Documentation

◆ addMarkedState()

Markup::addMarkedState (   stateName)
inline

Add marked state with specific name [Support in Server]

Parameters
stateNamestring PDF.annots.constant.MARKUP_ANNOTATION_STATE
Returns
Promise.<MarkupAnnotation.Note>

◆ addReply()

Markup::addReply (   content)
inline

Add a new reply to the end of reply list. [Support in Server]

Parameters
content{string} - Contents of reply annot.
Returns
{Promise.<Note>} event Events.annotationReplyAdd Note

◆ addReviewState()

Markup::addReviewState (   stateName)
inline

Add review state with specific name. [Support in Server]

Parameters
stateNamestring markup annotation review/mark state. Please refer to MARKUP_ANNOTATION_STATE.
Returns
Promise.<MarkupAnnotation.Note>

◆ exportToJSON()

Markup::exportToJSON ( )
inline

Export annotation to a json object. [Support in Server] Override Annot::exportToJSON.

Returns
{object} - A json object with caret properties:
{
...AnnotJSON,//properties from Annot::exportToJSON
opacity:{number},
creationdate:{string},//with format:"D:yyyyMMddhhmmssTZ"
IT:{string},
intent:{string},
subject:{string},
title:{string},
inreplyto:{string}
}

◆ getCreateDateTime()

Markup::getCreateDateTime ( )
inline

Get creation date time. [Support in Server]

Returns
{Date} - A Date object that receives the creation date time. If there is no creation date time information, new Date() would be returned.

◆ getGroupElements()

Markup::getGroupElements ( )
inline

Get the group annotations which own current annotation. [Support in Server]

Returns
{object} - An array of group annotations.
[
0:{Annot},
1:{Annot}
...
]

◆ getGroupHeader()

Markup::getGroupHeader ( )
inline

Get the header annotation (as primary annotation) of the group that current markup annotation belongs to. [Support in Server]

Returns
{Markup} - A markup annot which is group header.

◆ getIntent()

Markup::getIntent ( )
inline

Get intent name.
Following annotation types have predefined intent name:

  • FreeText annotation's predefined intent name: "FreeTextCallout", "FreeTextTypewriter". If no intent name is used, free text annotation would be shown as a text box.
  • Line annotation's predefined intent name: "LineArrow", "LineDimension". If no intent name is used, line annotation would be shown as a common line.
  • Polygon's predefined intent name: "PolygonCloud", "PolygonDimension". If no intent name is used, polygon annotation would be shown as a common polygon.
  • PolyLine annotation's predefined intent name: "PolyLineDimension". If no intent name is used, polyline annotation would be shown as a common polyline.
    Returns
    {string} - Annotaions's intent.

◆ getMarkedState()

Markup::getMarkedState (   index)
inline

Get a state annotation by index. state model is marked [Support in Server]

Parameters
index{number} - State annotation's index.
Returns
{Note} - State annotation.

◆ getMarkedStateCount()

Markup::getMarkedStateCount ( )
inline

Get the count of state annotations. [Support in Server]

Usually, when state model is marked, the markup annotation only has one state annotation.

Returns
{number} - The length of marked state annotations.

◆ getMarkedStates()

Markup::getMarkedStates ( )
inline

Get all state annotation. state model is marked [Support in Server]

Returns
{Note[]} - State annotations.

◆ getOpacity()

Markup::getOpacity ( )
inline

Get opacity value.
This property has effect on markup annotation's appearance. [Support in Server]

Returns
{number} The opacity value. Valid range: 0.0 to 1.0. 0.0 means full transparency and 1.0 means full opaque.

◆ getPopup()

Markup::getPopup ( )
inline

Get annotation's popup. [Support in Server]

Returns
{Popup} - Popup annotation.

◆ getReplies()

Markup::getReplies ( )
inline

Get all replies [Support in Server]

Returns
{Note[]} - An array with all reply annotations.

◆ getReply()

Markup::getReply (   index)
inline

Get a reply annot by index. [Support in Server]

Parameters
index{number} - An interge indecates reply annotation's position.
Returns
{Note} - An reply annotation.

◆ getReplyCount()

Markup::getReplyCount ( )
inline

Count all replies. [Support in Server]

Returns
{number} - The number of all replies.

◆ getReviewState()

Markup::getReviewState (   index)
inline

Get a state annotation by index. state model is review [Support in Server]

Parameters
index{number} - Review annotation's index.
Returns
{Note} - Review annotation.

◆ getReviewStateCount()

Markup::getReviewStateCount ( )
inline

Get the count of state annotations. [Support in Server]
When state model is review, the markup annotation can have several state annotations in a chain: first state annotation refers to the markup annotation, second state annotation refers to the first state annotation, etc. Just like this: markup annotation <– reviewed state1 <– reviewed state2 ...

Returns
{number} - Length of review state annotations.

◆ getReviewStates()

Markup::getReviewStates ( )
inline

Get all state annotation. state model is review [Support in Server]

Returns
{Note[]} - Review annotations.

◆ getSubject()

Markup::getSubject ( )
inline

Get subject string. [Support in Server]

Returns
{string} - A string indecates annot's subject.

◆ getTitle()

Markup::getTitle ( )
inline

Get title string. [Support in Server]

Returns
{string} - A string indecates annot's title.

◆ isGrouped()

Markup::isGrouped ( )
inline

Check whether current markup annotation is in a group or not. [Support in Server]

Returns
{boolean} - True for in, otherwise not.

◆ isGroupHeader()

Markup::isGroupHeader ( )
inline

Check whether current markup annotation is a group header annotation. [Support in Server]

Returns
{Markup[]} - True for positive, otherwise negtive.

◆ removeAllStateAnnots()

Markup::removeAllStateAnnots ( )
inline

Remove all sate from this markup annotation. [Support in Server]

Returns
Promise.<boolean>

◆ setContent()

Markup::setContent (   content)
inline

Set markup annotation's contents. [Support in Server]

Parameters
content{string} - New contents to be setted.
Returns
{Promise.<Array[Annot]>} - An array of modified annotations.

◆ setCreateDateTime()

Markup::setCreateDateTime (   date)
inline

Set creation date time. [Support in Server]

Parameters
date{number} - Millisecond value
Returns
{Promise.<Annot[]>} - Annotations modified.
event
Events.annotationUpdated Annot[] PDFPage

◆ setIntent()

Markup::setIntent (   intent)
inline

Set annotaions's intent.

Parameters
intent{string} - Annotation's new intent.
Returns
{Promise.<Annot[]>} - Annotations modified.

◆ setOpacity()

Markup::setOpacity (   opacity)
inline

Set opacity value. [Support in Server]

Parameters
opacity{number} The new opacity value. Valid range: 0.0 to 1.0. 0.0 means full transparency and 1.0 means full opaque.
Returns
{Promise.<Annot[]>} - An array of annotation objects which has been modified. event Events.annotationUpdated Annot[] PDFPage
Events.annotationAppearanceUpdated Annot[] PDFPage

◆ setSubject()

Markup::setSubject (   subject)
inline

Set subject string. [Support in Server]

Parameters
subject{string} - A string indecates annot's subject.
Returns
{Promise.<Annot[]>} event Events.annotationUpdated Annot[] PDFPage

◆ setTitle()

Markup::setTitle (   title)
inline

Set title string. [Support in Server]

Parameters
title{string} - A string indecates annot's title.
Returns
{Promise.<Annot[]>} event Events.annotationUpdated Annot[] PDFPage

Foxit Software Corporation Logo
@2021 Foxit Software Incorporated. All rights reserved.