Foxit PDF SDK
FSFreeText Class Reference
Inheritance diagram for FSFreeText:
FSMarkup FSAnnot FSBase

Instance Methods

(FSDefaultAppearance *) - getDefaultAppearance
 Get default appearance data.
More...
 
(id) - init
 Constructor.

 
(id) - initWithAnnot:
 Constructor, with parent class object.
More...
 
(void) - rotate:
 Rotate current annotation from current state with specified rotation value (in clockwise).
More...
 
(BOOL) - setDefaultAppearance:
 Set default appearance data.
More...
 
- Instance Methods inherited from FSMarkup
(FSNote *) - addReply
 Add a new reply to the end of reply list.
More...
 
(void) - addRichText:style:
 Add a new rich text string to the end.
More...
 
(FSNote *) - addStateAnnot:model:state:
 Add a new state annotation.
More...
 
(FSMarkupArray *) - getGroupElements
 Get an element (as markup annotation) from the group that current markup annotation belongs to.
More...
 
(FSMarkup *) - getGroupHeader
 Get the header annotation (as primary annotation) of the group that current markup annotation belongs to.
More...
 
(FSNote *) - getReply:
 Get a reply by index.
More...
 
(int) - getReplyCount
 Count all replies.
More...
 
(NSString *) - getRichTextContent:
 Get text string of a rich text string specified by index.
More...
 
(int) - getRichTextCount
 Get the count of rich text string.
More...
 
(FSRichTextStyle *) - getRichTextStyle:
 Get style data of a rich text string specified by index.
More...
 
(FSNoteArray *) - getStateAnnots:
 Get all state annotations in a specified state model.
More...
 
(void) - insertRichText:content:style:
 Insert a new rich text string to the place which is specified by index.
More...
 
(BOOL) - isGrouped
 Check whether current markup annotation is in a group or not.
More...
 
(BOOL) - removeAllReplies
 Remove all the replies.
More...
 
(BOOL) - removeAllStateAnnots
 Remove all the state annotations.
More...
 
(BOOL) - removeReply:
 Remove a reply by index.
More...
 
(void) - removeRichText:
 Remove a rich text string specified by index.
More...
 
(void) - setRichTextContent:content:
 Set text string of a rich text string specified by index.
More...
 
(void) - setRichTextStyle:style:
 Set style data of a rich text string specified by index.
More...
 
(BOOL) - ungroup
 Ungroup current markup annotation from the group it belongs to.
More...
 
- Instance Methods inherited from FSAnnot
(FSPDFStream *) - getAppearanceStream:appearance_state:
 Get annotation's appearance stream with specified type and state.
More...
 
(FSRectI *) - getDeviceRect:
 Get annotation rectangle in device coordinate system.
More...
 
(FSPDFDictionary *) - getDict
 Get annotation's dictionary object.
More...
 
(FSMatrix2D *) - getDisplayMatrix:
 Get the display matrix, from PDF coordinate system to targeted device coordinate system.
More...
 
(int) - getIndex
 Get the index of current annotation in the page which current annotation belongs to.
More...
 
(FSPDFDictionary *) - getOptionalContent
 Get the PDF dictionary of annotation's optional content.
More...
 
(FSPDFPage *) - getPage
 Get the related PDF page.
More...
 
(FSRectF *) - getRect
 Get rectangle, in PDF coordinate system.
More...
 
(FSAnnotType- getType
 Get actual annotation type of current annotation.
More...
 
(BOOL) - hasProperty:
 Whether current annotation has the specified annotation's property.
More...
 
(id) - initWithPage:annot_dict:
 Constructor, with PDF page and annotation's PDF dictionary.
More...
 
(BOOL) - isEmpty
 Check whether current object is empty or not.
More...
 
(BOOL) - isMarkup
 Check if current annotation is a markup annotation.
More...
 
(BOOL) - move:
 Move current annotation to a new position, specified by a new rectangle in PDF coordinate system.
More...
 
(BOOL) - removeProperty:
 Remove a specified annotation's property.
More...
 
(BOOL) - resetAppearanceStream
 Reset appearance stream.
More...
 

Properties

FSAlignment alignment
 Get or Set alignment value.
More...
 
FSMarkupEndingStyle calloutLineEndingStyle
 Get or Set line ending style of the start point in a callout line.
More...
 
FSPointFArraycalloutLinePoints
 Get or Set a point of callout line points.
More...
 
unsigned int fillColor
 Get or Set fill color.
More...
 
FSRectFinnerRect
 Get or Set the inner rectangle.
More...
 
FSRotation rotation
 Get or Set current rotation value (in clockwise).

 
FSMatrix2DtextMatrix
 Get or Set matrix in default appearance data for text in current free text annotation.
More...
 
- Properties inherited from FSMarkup
FSDateTimecreationDateTime
 Get or Set creation date time.

 
NSString * intent
 Get or Set intent name.
More...
 
float opacity
 Get or Set opacity value.
More...
 
FSPopuppopup
 Get or Set related pop-up annotation.
More...
 
NSString * subject
 Get or Set subject string.

 
NSString * title
 Get or Set title string.
More...
 
- Properties inherited from FSAnnot
unsigned int borderColor
 Get or Set border color.
More...
 
FSBorderInfoborderInfo
 Get or Set border information.
More...
 
NSString * content
 Get or Set content.

 
unsigned int flags
 Get or Set annotation flags.

 
FSDateTimemodifiedDateTime
 Get or Set last modified date time.

 
NSString * uniqueID
 Get or Set unique ID.

 

Detailed Description

A free text annotation displays text directly on the page. So free text annotation does not need a related pop-up annotation to show the text.
Free text annotation is a kind of markup annotation, so class FSFreeText is derived from class FSMarkup , and also offers functions to get/set free text annotation's properties and reset appearance stream of a free text annotation.

Note
For a newly created free text annotation, if user calls function FSAnnot::resetAppearanceStream directly without setting any properties, the default appearance will be used:
border width = 1.0, border style = FSBorderInfoSolid, border color = 0xFFFF0000 (red), opacity = 1.0, alignment = 0 (as left-justified), default appearance flags = FSDefaultAppearanceFlagFont| FSDefaultAppearanceFlagTextColor| FSDefaultAppearanceFlagFontSize, default appearance font is created based on FSFontStdIDHelvetica, default appearance text size = 12, default appearance text color = 0xFF0000FF (blue).
See also
FSMarkup

Method Documentation

◆ getDefaultAppearance()

- (FSDefaultAppearance *) getDefaultAppearance

Get default appearance data.

This property has effect on free text annotation's appearance. Default appearance data can be used in formatting text.

Returns
The default appearance data.

◆ initWithAnnot:()

- (id) initWithAnnot: (FSAnnot*)  annot

Constructor, with parent class object.

Parameters
[in]annotParent class object.

Reimplemented from FSMarkup.

◆ rotate:()

- (void) rotate: (FSRotation rotation

Rotate current annotation from current state with specified rotation value (in clockwise).

Parameters
[in]rotationRotation value which represents the degree used to rotate current annotation from current state in clockwise. Please refer to values starting from FSRotation0 and this should be one of these values except FSRotationUnknown. Specially, if the input value is FSRotation0 (which means not to rotate current annotation), current function will do nothing.
Returns
YES means success, while NO means failure.

◆ setDefaultAppearance:()

- (BOOL) setDefaultAppearance: (FSDefaultAppearance*)  default_ap

Set default appearance data.

This property has effect on free text annotation's appearance. Default appearance data can be used in formatting text.
If user wants the new default appearance data has effect on annotation's appearance, please call function FSAnnot::resetAppearanceStream after setting new default appearance data.

Parameters
[in]default_apThe new default appearance data to be set. flags of input data can be used to decide which information is/are to be updated with the new data; for those no updated data, they will keep to use old data.
Returns
YES means success, while NO means failure. Specially, this function will return NO if the parameter default_ap contains any incorrect value, for example:

Property Documentation

◆ alignment

- (FSAlignment) alignment
readwritenonatomicassign

Get or Set alignment value.

This property has effect on free text annotation's appearance.

◆ calloutLineEndingStyle

- (FSMarkupEndingStyle) calloutLineEndingStyle
readwritenonatomicassign

Get or Set line ending style of the start point in a callout line.

Only when the intent name of a free text annotation is "FreeTextCallout", this free text annotation can have line ending style property, and this property has effect on this kind of free text annotation's appearance.

◆ calloutLinePoints

- (FSPointFArray *) calloutLinePoints
readwritenonatomicweak

Get or Set a point of 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.


◆ fillColor

- (unsigned int) fillColor
readwritenonatomicassign

Get or Set fill color.

This property has effect on free text annotation's appearance. Fill color is used to fill the background of text box, and also for some callout line ending styles:
"Square", "Circle", "Diamond", "ClosedArrow", "RClosedArrow".

◆ innerRect

- (FSRectF *) innerRect
readwritenonatomicweak

Get or Set the inner rectangle.

This property has effect on free text annotation's appearance. For a free text annotation, inner rectangle is where the annotation's text should be displayed. The inner rectangle could be just the same as or less than the annotation's rectangle, and should never be larger than annotation's rectangle.

◆ textMatrix

- (FSMatrix2D *) textMatrix
readwritenonatomicweak

Get or Set matrix in default appearance data for text in current free text annotation.

Deprecated:
Current function has been deprecated since Foxit PDF SDK 7.4. This property will not have any effect on annotation's appearance any more.

This property has effect on free text annotation's appearance. This property can be used to change the skew of text's display.