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

Instance Methods

(FSMarkup *) - getReplyTo
 Get the markup annotation, which current note annotation is in reply to.
More...
 
(FSMarkupStateModel- getStateModel
 Get the state model.
More...
 
(id) - init
 Constructor.

 
(id) - initWithAnnot:
 Constructor, with parent class object.
More...
 
(BOOL) - isStateAnnot
 Check if current note annotation is used as a state annotation.
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 strings.
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) - removePopup
 Remove related pop-up annotation.
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

NSString * iconName
 Get or Set icon name.
More...
 
BOOL openStatus
 Get or Set open status.
More...
 
FSMarkupState state
 Get or Set the state.
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 note annotation (known as "text" annotation in <PDF reference 1.7>) represents a "sticky note" attached to a point in the PDF document. When closed, the annotation appears as an icon; when open, it displays a pop-up window containing the text of the note in a font and size chosen by the viewer application.
A note annotation can also be used as a reply to a markup annotation, or a state annotation:

  • When as a reply, the note annotation should not be shown alone but together with other replies in the form of threaded comments. Function FSNote::getReplyTo can be used to get the markup annotation, to which the note annotation replies.
  • When as a state, the note annotation would not be shown alone. Function FSNote::isStateAnnot can be used to judge if a note annotation is used as a state.

Note annotation is a kind of markup annotation, so class FSNote is derived from class FSMarkup . It offers functions to get/set note annotation's properties and reset appearance of a note annotation.

Note
For a newly created common note annotation, if user calls function FSAnnot::resetAppearanceStream directly without setting any properties, the default appearance will be used:
border color = 0xFFFFFF00 (yellow), opacity = 1.0, icon name = "Comment".
See also
FSMarkup

Method Documentation

◆ getReplyTo()

- (FSMarkup *) getReplyTo

Get the markup annotation, which current note annotation is in reply to.

This function is only useful when current note annotation is used as a reply.

Returns
A markup annotation object, which current note annotation is in reply to. If the return value of function FSAnnotationSummarySettings::isEmpty (inherited from Markup's parent class) for the returned markup annotation object is YES, that means current note annotation is not used as a reply.

◆ getStateModel()

- (FSMarkupStateModel) getStateModel

Get the state model.

This function can only be used when current note annotation is used as a state annotation. Function FSNote::isStateAnnot can be used to check if current note annotation is used as a state annotation.

Returns
The state model. If function succeeds, the return value would be FSMarkupStateModelMarked or FSMarkupStateModelReview.
If current note annotation is not a state annotation, this function will return 0.

◆ initWithAnnot:()

- (id) initWithAnnot: (FSAnnot*)  annot

Constructor, with parent class object.

Parameters
[in]annotParent class object.

Reimplemented from FSMarkup.

◆ isStateAnnot()

- (BOOL) isStateAnnot

Check if current note annotation is used as a state annotation.

Returns
YES means current note annotation is used as a state annotation, while NO means current note annotation is just a common note annotation.

Property Documentation

◆ iconName

- (NSString *) iconName
readwritenonatomicweak

Get or Set icon name.

This property has effect on note annotation's appearance. Note annotation has predefined standard icon names:
"Check", "Circle", "Comment", "Cross", "Help", "Insert", "Key", "NewParagraph", "Note", "Paragraph", "RightArrow", "RightPointer", "Star", "UpArrow", "UpLeftArrow".
An empty icon name string means current note annotation would be treated as "Note" icon.

◆ openStatus

- (BOOL) openStatus
readwritenonatomicassign

Get or Set open status.

Open status is a boolean value that specifies whether a note annotation should initially be displayed open:

  • YES means the note annotation should be initially be displayed open.
  • NO means the note annotation should be initially be displayed closed.


◆ state

- (FSMarkupState) state
readwritenonatomicassign

Get or Set the state.

This function can only be used when current note annotation is used as a state annotation. Function FSNote::isStateAnnot can be used to check if current note annotation is used as a state annotation.