FoxitPDFSDKforWeb  7.1.1
Foxit PDF SDK for Web
FreeText Class Reference

Free text annot object. More...

Inheritance diagram for FreeText:
Markup Markup Annot Annot

Public Member Functions

 exportToJSON ()
 Export annotation to a json object. Override Markup::exportToJSON. More...
 
 getCalloutLineEndingStyle ()
 Get callout line ending style. More...
 
 getCalloutLinePoints ()
 Get points of callout line. More...
 
 getFillColor ()
 Get free text's fill color. More...
 
 getInnerRect ()
 Get annotation's innert rect, in PDF coordination system. More...
 
 setAlignment (value)
 Controls the alignment of the text for a FreeText annotation. More...
 
 setCalloutLineEndingStyle (endingStyle)
 Get callout line ending style. More...
 
 setCalloutLinePoints (calloutLinePoints)
 Set annotation's callout points. More...
 
 setFillColor (fillColor)
 Set free text's fill color. More...
 
 setInnerRect (rect)
 Set annotation's inner rect. More...
 
- Public Member Functions inherited from Markup
 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

Free text annot object.

Member Function Documentation

◆ exportToJSON()

FreeText::exportToJSON ( )
inline

Export annotation to a json object. Override Markup::exportToJSON.

Returns
{object} - A json object with free text properties:
{
...MarkupAnnotJSON,//JSON object from Markup::exportToJSON()
fringe:{string}, //"[{left},{bottom},{right},{top}]",
callout:"{x1},{y1},{x2},{y2},{x3},{y3}" // Callout line points. Only when the intent name of a free text annotation is "FreeTextCallout", this free text annotation can have callout line points property, and this property has effect on this kind of free text annotation's appearance. For a callout line, it can contain 2 or 3 points: 2 points represent the starting point and ending point of the callout line; 3 points represent the starting point, knee point, and ending point of the callout line.
head:{string},//0 for 'None', 1 for 'Square', 2 for 'Circle', 3 for 'Diamond', 4 for 'OpenArrow', 5 for 'ClosedArrow', 6 for 'Butt', 7 for 'ReverseOpenArrow', 8 for 'ReverseClosedArrow', 9 for 'Slash'
}

◆ getCalloutLineEndingStyle()

FreeText::getCalloutLineEndingStyle ( )
inline

Get callout line ending style.

Returns
{number} - An interge value, one of:
0 for 'None'
1 for 'Square'
2 for 'Circle'
3 for 'Diamond'
4 for 'OpenArrow'
5 for 'ClosedArrow'
6 for 'Butt'
7 for 'ReverseOpenArrow'
8 for 'ReverseClosedArrow'
9 for 'Slash'

◆ getCalloutLinePoints()

FreeText::getCalloutLinePoints ( )
inline

Get points of callout line.

Returns
{Array[object]} - An array of line points.
[
{
x:{number},
y:{number}
},
{
x:{number},
y:{number}
},
{
x:{number},
y:{number}
}
]

◆ getFillColor()

FreeText::getFillColor ( )
inline

Get free text's fill color.

Returns
{number} - An interge indecated fill color.

◆ getInnerRect()

FreeText::getInnerRect ( )
inline

Get annotation's innert rect, in PDF coordination system.

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

◆ setAlignment()

FreeText::setAlignment (   value)
inline

Controls the alignment of the text for a FreeText annotation.

Parameters
value{number} - Alignment. left:0, center:1, right:2.

◆ setCalloutLineEndingStyle()

FreeText::setCalloutLineEndingStyle (   endingStyle)
inline

Get callout line ending style.

Parameters
endingStyle{number} - An interge value indecates ending style, one of:
0 for 'None'
1 for 'Square'
2 for 'Circle'
3 for 'Diamond'
4 for 'OpenArrow'
5 for 'ClosedArrow'
6 for 'Butt'
7 for 'ReverseOpenArrow'
8 for 'ReverseClosedArrow'
9 for 'Slash'
Returns
{Promise.<*>}

◆ setCalloutLinePoints()

FreeText::setCalloutLinePoints (   calloutLinePoints)
inline

Set annotation's callout points.

Parameters
calloutLinePoints{Array[object]} - An array of line points.
[
{
x:{number},
y:{number}
},
{
x:{number},
y:{number}
},
{
x:{number},
y:{number}
}
]
Returns
{Promise.<T>|*}

◆ setFillColor()

FreeText::setFillColor (   fillColor)
inline

Set free text's fill color.

Parameters
styleFillColor{number} - An interge indecated fill color.
Returns
{Promise.<boolean>} - A boolean value indecated success or failue.

◆ setInnerRect()

FreeText::setInnerRect (   rect)
inline

Set annotation's inner rect.

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

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