FoxitPDFSDKforWeb  7.1.1
Foxit PDF SDK for Web
Annot Class Reference

PDF annot object. More...

Inheritance diagram for Annot:
Link Markup Screen 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

 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

PDF annot object.

Member Function Documentation

◆ exportToJSON()

Annot::exportToJSON ( )
inline

Export annotation to a json object.

Returns
{object} - A json object of annotation's property. The key and value formats try to follow XFDF specifications
{
type: *,
color: {string},
flags: {string},
date:{stromg},//{D:20190321150656+08'00'}
name: *,
page: (*|number),
rect: {string},
contents: (*|string),
width: borderWidth
}

◆ getBorderColor()

Annot::getBorderColor ( )
inline

Get annotation's border color.

Returns
{number} - An interge indecated border color will be returned.

◆ getBorderInfo()

Annot::getBorderInfo ( )
inline

Get annotation's border information.

Returns
{borderInfo|{cloudIntensity, dashPhase, dashes, style, width}} -
{
cloudIntensity:{number},//Intensity of the cloudy effect, only 0~2 is valid.
dashPhase:{number},//Dash phase.
dashes:Array[number],//A dash array that represents the dash patterns. It's valid when border style is dashed.
style:{number},//solid: 0, dashed: 1, underline: 2, beveled: 3, inset: 4, cloudy: 5
width:{numner}
}

◆ getContent()

Annot::getContent ( )
inline

Get annotation's contents.

Returns
{*|string} - Annotation's contents will be returned.

◆ getFlags()

Annot::getFlags ( )
inline

Get annotation's flag.

Returns
{Promise.<T>|*}
{number} - Annotation flag number.
See also
Annot_Flags

◆ getModifiedDateTime()

Annot::getModifiedDateTime ( )
inline

Get annotation's last modified date time.

Returns
{Date|null} - A Date objet, If there is no modified date time information, null would be returned

◆ getPage()

Annot::getPage ( )
inline

Get annotation's page.

Returns
{PDFPage} - PDF page object.

◆ getRect()

Annot::getRect ( )
inline

Get annotation's rect.

Returns
{PDFRect} - A PDF rectangle.
{
left:{number},
top:{number},
right:{number},
bottom:{number}
}

◆ getTitle()

Annot::getTitle ( )
inline

Get annotation's title.

Returns
{string} - A string indicates annotation's title.

◆ getType()

Annot::getType ( )
inline

Get annotation's type.

Returns
{string} - A string indicates annotation's type.

◆ getUniqueID()

Annot::getUniqueID ( )
inline

Get annotation's unique ID.

Returns
{string} - A string indicates annotation's unique ID.

◆ isEmpty()

Annot::isEmpty ( )
inline

Check annotation is empty or not.

Returns
{boolean|*} - Annotation is empty or not

◆ isMarkup()

Annot::isMarkup ( )
inline

Check if current annotation is a markup annotation.

Returns
{bool} - true means current annotation is a markup annotation, while false means current annotation is not a markup annotation.

◆ setBorderColor()

Annot::setBorderColor (   borderColor)
inline

Set annotation's border color.

Parameters
borderColor{number} - An interge indecated border color.
Returns
{Promise.<T>|*} - A boolean value indecated whether success.

◆ setBorderInfo()

Annot::setBorderInfo (   borderInfo)
inline

Set annotation's border information.

Note
For some sepecial case, unexpected result will happen. Such as: cloudy border is supported with polygon, square and circle annot; any style is unsupported with text markup,caret, stamp, ink and note annot;
Parameters
{borderInfo|{cloudIntensity,dashPhase,dashes,style,width}}- Border infomation.
  • {
    cloudIntensity:{number},//Intensity of the cloudy effect, only 0~2 is valid.
    dashPhase:{number},//Dash phase.
    dashes:Array[number],//A dash array that represents the dash patterns.
    style:{number},//solid: 0, dashed: 1, cloudy: 5
    width:{numner}
    }
Returns
{Promise.<T>}

◆ setContent()

Annot::setContent (   content)
inline

Set annotation's contents.

Parameters
content{string} - New contents to be setted.
Returns
{Promise.<Annot>} - Annotations modified will be returned.

◆ setFlags()

Annot::setFlags (   flag)
inline

Set annotation's flag.

Parameters
flag{number} - An Annot_Flags number indecate annotation's flag.
Returns
{Promise.<T>|*} - A boolean value indecated success or failue.

◆ setModifiedDateTime()

Annot::setModifiedDateTime (   date)
inline

Set annotation's last modified date time.

Parameters
date{Date|number} A Date object or an interge indecate million secounds from 1970.1.1 00:00:00.
Returns
{Promise.<T>|*}

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