FoxitPDFSDKforWeb  7.1.1
Foxit PDF SDK for Web
Markup Class Reference

Markup annot object. More...

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

Public Member Functions

 addMarkedState (stateName)
 Add marked state with specific name. More...
 
 addReply (content)
 Add a new reply to the end of reply list. More...
 
 addReviewState (stateName)
 Add review state with specific name. More...
 
 exportToJSON ()
 Export annotation to a json object. Override Annot::exportToJSON. More...
 
 getCreateDateTime ()
 Get creation date time. More...
 
 getGroupElements ()
 Get the group annotations which own current annotation. More...
 
 getGroupHeader ()
 Get the header annotation (as primary annotation) of the group that current markup annotation belongs to. 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. More...
 
 getMarkedStateCount ()
 Get the count of state annotations. More...
 
 getMarkedStates ()
 Get all state annotation. state model is marked. More...
 
 getOpacity ()
 Get opacity value.
This property has effect on markup annotation's appearance. More...
 
 getPopup ()
 Get annotation's popup. More...
 
 getReplies ()
 Get all replies. More...
 
 getReply (index)
 Get a reply annot by index. More...
 
 getReplyCount ()
 Count all replies. More...
 
 getReviewState (index)
 Get a state annotation by index. state model is review. More...
 
 getReviewStateCount ()
 Get the count of state annotations.
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. More...
 
 getSubject ()
 Get subject string. More...
 
 getTitle ()
 Get title string. More...
 
 isGrouped ()
 Check whether current markup annotation is in a group or not. More...
 
 isGroupHeader ()
 Check whether current markup annotation is a group header annotation. More...
 
 removeAllStateAnnots ()
 Remove all sate from this markup annotation. More...
 
 setContent (content)
 Set markup annotation's contents. More...
 
 setCreateDateTime (date)
 Set creation date time. More...
 
 setIntent (intent)
 Set annotaions's intent. More...
 
 setOpacity (opacity)
 Set opacity value. More...
 
 setSubject (subject)
 Set subject string. More...
 
 setTitle (title)
 Set title string. More...
 
- Public Member Functions inherited from Annot
 exportToJSON ()
 Export annotation to a json object. More...
 
 getBorderColor ()
 Get annotation's border color. More...
 
 getBorderInfo ()
 Get annotation's border information. More...
 
 getContent ()
 Get annotation's contents. More...
 
 getFlags ()
 Get annotation's flag. More...
 
 getModifiedDateTime ()
 Get annotation's last modified date time. More...
 
 getPage ()
 Get annotation's page. More...
 
 getRect ()
 Get annotation's rect. More...
 
 getTitle ()
 Get annotation's title. More...
 
 getType ()
 Get annotation's type. More...
 
 getUniqueID ()
 Get annotation's unique ID. More...
 
 isEmpty ()
 Check annotation is empty or not. More...
 
 isMarkup ()
 Check if current annotation is a markup annotation. More...
 
 setBorderColor (borderColor)
 Set annotation's border color. More...
 
 setBorderInfo (borderInfo)
 Set annotation's border information. More...
 
 setContent (content)
 Set annotation's contents. More...
 
 setFlags (flag)
 Set annotation's flag. More...
 
 setModifiedDateTime (date)
 Set annotation's last modified date time. More...
 

Detailed Description

Markup annot object.

Member Function Documentation

◆ addMarkedState()

Markup::addMarkedState (   stateName)
inline

Add marked state with specific name.

Parameters
stateNamestring
Returns
Promise.<MarkupAnnotation.Note>

◆ addReply()

Markup::addReply (   content)
inline

Add a new reply to the end of reply list.

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

◆ addReviewState()

Markup::addReviewState (   stateName)
inline

Add review state with specific name.

Parameters
stateNamestring
Returns
Promise.<MarkupAnnotation.Note>

◆ exportToJSON()

Markup::exportToJSON ( )
inline

Export annotation to a json object. 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.

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

◆ getGroupElements()

Markup::getGroupElements ( )
inline

Get the group annotations which own current annotation.

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.

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.

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

◆ getMarkedStateCount()

Markup::getMarkedStateCount ( )
inline

Get the count of state annotations.

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.

Returns
{Note[]} - State annotations.

◆ getOpacity()

Markup::getOpacity ( )
inline

Get opacity value.
This property has effect on markup annotation's appearance.

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.

Returns
{Popup} - Popup annotation.

◆ getReplies()

Markup::getReplies ( )
inline

Get all replies.

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

◆ getReply()

Markup::getReply (   index)
inline

Get a reply annot by index.

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

◆ getReplyCount()

Markup::getReplyCount ( )
inline

Count all replies.

Returns
{number} - The number of all replies.

◆ getReviewState()

Markup::getReviewState (   index)
inline

Get a state annotation by index. state model is review.

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

◆ getReviewStateCount()

Markup::getReviewStateCount ( )
inline

Get the count of state annotations.
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.

Returns
{Note[]} - Review annotations.

◆ getSubject()

Markup::getSubject ( )
inline

Get subject string.

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

◆ getTitle()

Markup::getTitle ( )
inline

Get title string.

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

◆ isGrouped()

Markup::isGrouped ( )
inline

Check whether current markup annotation is in a group or not.

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

◆ isGroupHeader()

Markup::isGroupHeader ( )
inline

Check whether current markup annotation is a group header annotation.

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

◆ removeAllStateAnnots()

Markup::removeAllStateAnnots ( )
inline

Remove all sate from this markup annotation.

Returns
Promise.<boolean>

◆ setContent()

Markup::setContent (   content)
inline

Set markup annotation's contents.

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.

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.

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. @pro event @problock Events.annotationUpdated Annot[] PDFPage
Events.annotationAppearanceUpdated Annot[] PDFPage @endproblock

◆ setSubject()

Markup::setSubject (   subject)
inline

Set subject string.

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

◆ setTitle()

Markup::setTitle (   title)
inline

Set title string.

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

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