PDF Annotation

Definitions for PDF annotations access.
Definitions and functions in this module are included in fpdf_annot_r.h and fpdf_annot_w.h.
Module: PDFAnnot
License Identifier: PDFAnnot/All
Available License Right: Reading/Writing
For License Right Reading, see fpdf_annot_r.h.
For License Right Writing, see fpdf_annot_w.h.
More...

Classes

struct  FSPDF_ANNOTICONFIT
 Structure for annotation icon fit. More...
 
struct  FSPDF_ANNOTBORDER
 Structure for annotation border. More...
 
struct  FSPDF_ICONPROVIDER
 Structure for the provider of alternate icons. More...
 

Functions

FS_RESULT FSPDF_Page_LoadAnnots (FSCRT_PAGE page)
 Load annotations from a PDF page. More...
 
FS_RESULT FSPDF_Page_UnloadAnnots (FSCRT_PAGE page)
 Unload annotations of a PDF page. More...
 
FS_RESULT FSPDF_Annot_GetCount (FSCRT_PAGE page, const FSCRT_BSTR *filter, FS_INT32 *count)
 Get count of annotations, by specific filter. More...
 
FS_RESULT FSPDF_Annot_Get (FSCRT_PAGE page, const FSCRT_BSTR *filter, FS_INT32 index, FSCRT_ANNOT *annot)
 Get annotation with specified index, by specific filter. More...
 
FS_RESULT FSPDF_Annot_GetAtPos (FSCRT_PAGE page, const FSCRT_BSTR *filter, FS_FLOAT x, FS_FLOAT y, FS_FLOAT tolerance, FSCRT_ANNOT *annot)
 Get annotation at a specific position in PDF page, by specific filter. More...
 
FS_RESULT FSPDF_Annot_GetAtDevicePos (FSCRT_PAGE page, const FSCRT_BSTR *filter, const FSCRT_MATRIX *matrix, FS_INT32 x, FS_INT32 y, FS_INT32 tolerance, FSCRT_ANNOT *annot)
 Get annotation at a specific position in device (in pixel), by specific filter. More...
 
FS_RESULT FSPDF_Annot_GetIndex (FSCRT_ANNOT annot, const FSCRT_BSTR *filter, FS_INT32 *index)
 Get index of a specific annotation, by specific filter. More...
 
FS_RESULT FSPDF_Annot_GetAllByTabOrder (FSCRT_PAGE page, const FSCRT_BSTR *filter, FSCRT_ANNOT *annotArray, FS_INT32 *count)
 Get annotations by tab order, with specific filter (except pop-up annotation). More...
 
FS_RESULT FSPDF_Annot_GetType (FSCRT_ANNOT annot, FSCRT_BSTR *annotType)
 Get type of an annotation. More...
 
FS_RESULT FSPDF_Annot_GetRect (FSCRT_ANNOT annot, FSCRT_RECTF *rect)
 Get rectangle of an annotation. More...
 
FS_RESULT FSPDF_Annot_GetDeviceRect (FSCRT_ANNOT annot, FS_BOOL bTransformIcon, const FSCRT_MATRIX *matrix, FSCRT_RECT *deviceRect)
 Get rectangle of an annotation in device coordinations. More...
 
FS_RESULT FSPDF_Annot_GetFlags (FSCRT_ANNOT annot, FS_DWORD *flags)
 Get flags of an annotation. More...
 
FS_RESULT FSPDF_Annot_GetName (FSCRT_ANNOT annot, FSCRT_BSTR *name)
 Get name of an annotation. More...
 
FS_RESULT FSPDF_Annot_GetContents (FSCRT_ANNOT annot, FSCRT_BSTR *contents)
 Get contents of an annotation. More...
 
FS_RESULT FSPDF_Annot_GetBorder (FSCRT_ANNOT annot, FSPDF_ANNOTBORDER *border)
 Get border of an annotation. More...
 
FS_RESULT FSPDF_Annot_GetColor (FSCRT_ANNOT annot, FS_BOOL isFillColor, FS_ARGB *color)
 Get fill or border color of an annotation. More...
 
FS_RESULT FSPDF_Annot_GetModifiedDateTime (FSCRT_ANNOT annot, FSCRT_DATETIMEZONE *dt)
 Get modification time of an annotation. More...
 
FS_RESULT FSPDF_Annot_GetCreationDateTime (FSCRT_ANNOT annot, FSCRT_DATETIMEZONE *dt)
 Get creation time of a markup annotation. More...
 
FS_RESULT FSPDF_Annot_GetSubject (FSCRT_ANNOT annot, FSCRT_BSTR *subject)
 Get subject of a markup annotation. More...
 
FS_RESULT FSPDF_Annot_GetTitle (FSCRT_ANNOT annot, FSCRT_BSTR *title)
 Get title of a markup annotation. More...
 
FS_RESULT FSPDF_Annot_GetOpacity (FSCRT_ANNOT annot, FS_FLOAT *opacity)
 Get opacity of a markup annotation. More...
 
FS_RESULT FSPDF_Annot_GetIntent (FSCRT_ANNOT annot, FSCRT_BSTR *intent)
 Get intent of a markup annotation. More...
 
FS_RESULT FSPDF_Annot_GetOpenStatus (FSCRT_ANNOT annot, FS_BOOL *isOpen)
 Get open status of a text or pop-up annotation. More...
 
FS_RESULT FSPDF_Annot_GetIconName (FSCRT_ANNOT annot, FSCRT_BSTR *iconName)
 Get icon name of an annotation. More...
 
FS_RESULT FSPDF_Annot_GetAlignment (FSCRT_ANNOT annot, FS_INT32 *alignment)
 Get alignment of a free text annotation. More...
 
FS_RESULT FSPDF_Annot_GetHighlightingMode (FSCRT_ANNOT annot, FS_INT32 *hlMode)
 Get highlighting mode of a link or widget annotation. More...
 
FS_RESULT FSPDF_Annot_GetQuadPoints (FSCRT_ANNOT annot, FSCRT_QUADPOINTSF *quadPoints, FS_INT32 *count)
 Get quadrilaterals points of an annotation. More...
 
FS_RESULT FSPDF_Annot_GetCalloutLinePoints (FSCRT_ANNOT annot, FS_FLOAT *x1, FS_FLOAT *y1, FS_FLOAT *x2, FS_FLOAT *y2, FS_FLOAT *x3, FS_FLOAT *y3)
 Get callout line points of a free text annotation. More...
 
FS_RESULT FSPDF_Annot_GetInnerRectMargin (FSCRT_ANNOT annot, FS_FLOAT *left, FS_FLOAT *top, FS_FLOAT *right, FS_FLOAT *bottom)
 Get the margin between inner rectangle and rectangle of an annotation. More...
 
FS_RESULT FSPDF_Annot_GetLineEndingStyles (FSCRT_ANNOT annot, FSCRT_BSTR *startingStyle, FSCRT_BSTR *endingStyle)
 Get line ending styles of an annotation. More...
 
FS_RESULT FSPDF_Annot_GetLinePosition (FSCRT_ANNOT annot, FS_FLOAT *x1, FS_FLOAT *y1, FS_FLOAT *x2, FS_FLOAT *y2)
 Get line position of a line annotation. More...
 
FS_RESULT FSPDF_Annot_GetLeaderLineLength (FSCRT_ANNOT annot, FS_FLOAT *length)
 Get leader line length of a line annotation. More...
 
FS_RESULT FSPDF_Annot_GetLeaderLineExtension (FSCRT_ANNOT annot, FS_FLOAT *extLength)
 Get leader line extension of a line annotation. More...
 
FS_RESULT FSPDF_Annot_GetLeaderLineOffset (FSCRT_ANNOT annot, FS_FLOAT *offset)
 Get leader line offset of a line annotation. More...
 
FS_RESULT FSPDF_Annot_HasCaptionContents (FSCRT_ANNOT annot, FS_BOOL *hasCap)
 Check if there is a caption to a line annotation. More...
 
FS_RESULT FSPDF_Annot_GetCaptionPosition (FSCRT_ANNOT annot, FSCRT_BSTR *captionPos)
 Get caption position of a line annotation. More...
 
FS_RESULT FSPDF_Annot_GetCaptionOffset (FSCRT_ANNOT annot, FS_FLOAT *offsetx, FS_FLOAT *offsety)
 Get caption offset of a line annotation. More...
 
FS_RESULT FSPDF_Annot_GetVertices (FSCRT_ANNOT annot, FS_FLOAT *vertices, FS_INT32 *count)
 Get vertices of a polygon or polyline annotation. More...
 
FS_RESULT FSPDF_Annot_GetSymbol (FSCRT_ANNOT annot, FSCRT_BSTR *symbol)
 Get symbol of a caret annotation. More...
 
FS_RESULT FSPDF_Annot_GetInkList (FSCRT_ANNOT annot, FSCRT_PATHDATA *pathData)
 Get ink list data of an ink annotation. More...
 
FS_RESULT FSPDF_Annot_GetAttachment (FSCRT_ANNOT annot, FSPDF_ATTACHMENT *attachment)
 Get attachment of a file attachment annotation. More...
 
FS_RESULT FSPDF_Annot_GetDefaultAppearance (FSCRT_ANNOT annot, FSPDF_DEFAULTAPPEARANCE *defAppearance)
 Get default appearance of a free text annotation, which can be used in formatting text. More...
 
FS_RESULT FSPDF_Annot_GetIconFit (FSCRT_ANNOT annot, FSPDF_ANNOTICONFIT *iconFit)
 Get icon fit of a widget annotation. More...
 
FS_RESULT FSPDF_Annot_HasMKEntry (FSCRT_ANNOT annot, FS_INT32 mkEntry, FS_BOOL *hasEntry)
 Check if specific entry is in MK dictionary. More...
 
FS_RESULT FSPDF_Annot_GetMKRotation (FSCRT_ANNOT annot, FS_INT32 *degree)
 Get rotation (the number of degrees) in MK dictionary. More...
 
FS_RESULT FSPDF_Annot_GetMKColor (FSCRT_ANNOT annot, FS_INT32 mkEntry, FS_ARGB *color)
 Get color of specific type in MK dictionary. More...
 
FS_RESULT FSPDF_Annot_GetMKCaption (FSCRT_ANNOT annot, FS_INT32 mkEntry, FSCRT_BSTR *caption)
 Get caption of a specific type in MK dictionary. More...
 
FS_RESULT FSPDF_Annot_GetMKIconBitmap (FSCRT_ANNOT annot, FS_INT32 mkEntry, FSCRT_BITMAP *bitmap)
 Get icon bitmap of specific icon type in MK dictionary. More...
 
FS_RESULT FSPDF_Annot_GetFormControl (FSCRT_ANNOT widgetAnnot, FSPDF_FORMCONTROL *formControl)
 Get a PDF form control from a widget annotation handle. More...
 
FS_RESULT FSPDF_Annot_GetDict (FSCRT_ANNOT annot, FSPDF_OBJECT *dictionary)
 Get the dictionary of an annotation. More...
 
FS_RESULT FSPDF_Annot_CountStateAnnots (FSCRT_ANNOT annot, FS_INT32 stateModel, FS_INT32 *count)
 Count specific state annotations associated with a markup annotation. More...
 
FS_RESULT FSPDF_Annot_GetStateAnnot (FSCRT_ANNOT annot, FS_INT32 stateModel, FS_INT32 index, FSCRT_ANNOT *stateAnnot)
 Get specified state annotation associated with a markup annotation. More...
 
FS_RESULT FSPDF_Annot_GetState (FSCRT_ANNOT stateAnnot, FS_INT32 *stateModel, FS_INT32 *state)
 Get state model and state out of a state text annotation. More...
 
FS_RESULT FSPDF_Annot_IsGrouped (FSCRT_ANNOT annot, FS_BOOL *isGrouped)
 Check whether an annotation is in a group. More...
 
FS_RESULT FSPDF_Annot_GetGroupHeader (FSCRT_ANNOT annot, FSCRT_ANNOT *groupHeader)
 Get header annotation of a group, to which an annotation belongs. More...
 
FS_RESULT FSPDF_Annot_GetGroupElements (FSCRT_ANNOT annot, FSCRT_ANNOT *elements, FS_INT32 *count)
 Get group elements if annotation is in a group, including itself. More...
 
FS_RESULT FSPDF_Annot_CountReplies (FSCRT_ANNOT annot, FS_INT32 *count)
 Count replies of a markup annotation. More...
 
FS_RESULT FSPDF_Annot_GetReply (FSCRT_ANNOT annot, FS_INT32 index, FSCRT_ANNOT *replyAnnot)
 Get reply with specifies index of a markup annotation. More...
 
FS_RESULT FSPDF_Annot_GetPopup (FSCRT_ANNOT annot, FSCRT_ANNOT *popupAnnot)
 Get a pop-up annotation from a specific markup annotation. More...
 
FS_RESULT FSPDF_Annot_CountActions (FSCRT_ANNOT annot, FS_INT32 trigger, FS_INT32 *count)
 Count actions associated with an annotation. More...
 
FS_RESULT FSPDF_Annot_GetAction (FSCRT_ANNOT annot, FS_INT32 trigger, FS_INT32 index, FSPDF_ACTIONDATA *actionData)
 Get action data of specific index associated with an annotation. More...
 
FS_RESULT FSPDF_RenderContext_StartAnnots (FSPDF_RENDERCONTEXT pdfRenderContext, FSCRT_RENDERER renderer, const FSCRT_ANNOT *annots, FS_INT32 count, FSCRT_PROGRESS *renderProgress)
 Render annotations on render context. More...
 
FS_RESULT FSPDF_RenderContext_StartPageAnnots (FSPDF_RENDERCONTEXT pdfRenderContext, FSCRT_RENDERER renderer, FSCRT_PAGE page, FSCRT_PROGRESS *renderProgress)
 Render all annotations of a page on render context. More...
 
FS_RESULT FSPDF_Annot_Add (FSCRT_PAGE page, const FSCRT_RECTF *rect, const FSCRT_BSTR *annotType, const FSCRT_BSTR *filter, FS_INT32 index, FSCRT_ANNOT *annot)
 Add an annotation with a specific index, by specific filter. More...
 
FS_RESULT FSPDF_Annot_Remove (FSCRT_ANNOT annot)
 Remove an annotation from page. More...
 
FS_RESULT FSPDF_Annot_Move (FSCRT_ANNOT annot, const FSCRT_RECTF *newRect)
 Move an annotation to a new position specified by a rectangle. More...
 
FS_RESULT FSPDF_Annot_SetFlags (FSCRT_ANNOT annot, FS_DWORD flags)
 Set flags of an annotation. More...
 
FS_RESULT FSPDF_Annot_SetName (FSCRT_ANNOT annot, const FSCRT_BSTR *name)
 Set name of an annotation. More...
 
FS_RESULT FSPDF_Annot_SetSubject (FSCRT_ANNOT annot, const FSCRT_BSTR *subject)
 Set subject of a markup annotation. More...
 
FS_RESULT FSPDF_Annot_SetTitle (FSCRT_ANNOT annot, const FSCRT_BSTR *title)
 Set title of a markup annotation. More...
 
FS_RESULT FSPDF_Annot_SetContents (FSCRT_ANNOT annot, const FSCRT_BSTR *contents)
 Set contents of an annotation. More...
 
FS_RESULT FSPDF_Annot_SetIconName (FSCRT_ANNOT annot, const FSCRT_BSTR *iconName)
 Set icon name of an annotation. More...
 
FS_RESULT FSPDF_Annot_SetBorder (FSCRT_ANNOT annot, const FSPDF_ANNOTBORDER *border)
 Set border of an annotation. More...
 
FS_RESULT FSPDF_Annot_SetColor (FSCRT_ANNOT annot, FS_BOOL isFillColor, FS_ARGB color)
 Set filling or bordering color of an annotation. More...
 
FS_RESULT FSPDF_Annot_SetOpacity (FSCRT_ANNOT annot, FS_FLOAT opacity)
 Set opacity of an annotation. More...
 
FS_RESULT FSPDF_Annot_SetAlignment (FSCRT_ANNOT annot, FS_INT32 alignment)
 Set alignment of a free text annotation. More...
 
FS_RESULT FSPDF_Annot_SetCreationDateTime (FSCRT_ANNOT annot, const FSCRT_DATETIMEZONE *dt)
 Set creation time of a markup annotation. More...
 
FS_RESULT FSPDF_Annot_SetModifiedDateTime (FSCRT_ANNOT annot, const FSCRT_DATETIMEZONE *dt)
 Set modification time of an annotation. More...
 
FS_RESULT FSPDF_Annot_SetIntent (FSCRT_ANNOT annot, const FSCRT_BSTR *intent)
 Set intent of a markup annotation. More...
 
FS_RESULT FSPDF_Annot_SetPopup (FSCRT_ANNOT annot, FSCRT_ANNOT popupAnnot)
 Set a pop-up annotation to a specific markup annotation. More...
 
FS_RESULT FSPDF_Annot_SetOpenStatus (FSCRT_ANNOT annot, FS_BOOL status)
 Set open status of a text or pop-up annotation. More...
 
FS_RESULT FSPDF_Annot_SetHighlightingMode (FSCRT_ANNOT annot, FS_INT32 hlMode)
 Set highlighting mode of a link or widget annotation. More...
 
FS_RESULT FSPDF_Annot_SetQuadPoints (FSCRT_ANNOT annot, FSCRT_QUADPOINTSF *quadPoints, FS_INT32 count)
 Set quadrilaterals points of an annotation. More...
 
FS_RESULT FSPDF_Annot_SetCalloutLinePoints (FSCRT_ANNOT annot, FS_FLOAT x1, FS_FLOAT y1, FS_FLOAT x2, FS_FLOAT y2, FS_FLOAT x3, FS_FLOAT y3)
 Set callout line points of a free text annotation. More...
 
FS_RESULT FSPDF_Annot_SetInnerRectMargin (FSCRT_ANNOT annot, FS_FLOAT left, FS_FLOAT top, FS_FLOAT right, FS_FLOAT bottom)
 Set the margin between inner rectangle and rectangle of an annotation. More...
 
FS_RESULT FSPDF_Annot_SetLineEndingStyles (FSCRT_ANNOT annot, const FSCRT_BSTR *startingStyle, const FSCRT_BSTR *endingStyle)
 Set line ending styles of an annotation. More...
 
FS_RESULT FSPDF_Annot_SetLinePosition (FSCRT_ANNOT annot, FS_FLOAT x1, FS_FLOAT y1, FS_FLOAT x2, FS_FLOAT y2)
 Set line position of a line annotation. More...
 
FS_RESULT FSPDF_Annot_SetLeaderLineLength (FSCRT_ANNOT annot, FS_FLOAT length)
 Set leader line length of a line annotation. More...
 
FS_RESULT FSPDF_Annot_SetLeaderLineExtension (FSCRT_ANNOT annot, FS_FLOAT extLength)
 Set leader line extension of a line annotation. More...
 
FS_RESULT FSPDF_Annot_SetLeaderLineOffset (FSCRT_ANNOT annot, FS_FLOAT offset)
 Set leader line offset of a line annotation. More...
 
FS_RESULT FSPDF_Annot_SetCaptionContents (FSCRT_ANNOT annot, FS_BOOL hasCap)
 Set flag which decides whether to set a caption to the annotation or not. More...
 
FS_RESULT FSPDF_Annot_SetCaptionPosition (FSCRT_ANNOT annot, const FSCRT_BSTR *captionPos)
 Set caption position of a line annotation. More...
 
FS_RESULT FSPDF_Annot_SetCaptionOffset (FSCRT_ANNOT annot, FS_FLOAT offsetx, FS_FLOAT offsety)
 Set caption offset of a line annotation. More...
 
FS_RESULT FSPDF_Annot_SetVertices (FSCRT_ANNOT annot, FS_FLOAT *vertices, FS_INT32 count)
 Set vertices of a polygon or polyline annotation. More...
 
FS_RESULT FSPDF_Annot_SetSymbol (FSCRT_ANNOT annot, const FSCRT_BSTR *symbol)
 Set symbol of a caret annotation. More...
 
FS_RESULT FSPDF_Annot_SetInkList (FSCRT_ANNOT annot, FSCRT_PATHDATA pathData)
 Set ink list data of an ink annotation. More...
 
FS_RESULT FSPDF_Annot_SetAttachment (FSCRT_ANNOT annot, FSPDF_ATTACHMENT attachment)
 Set attachment of a file attachment annotation. More...
 
FS_RESULT FSPDF_Annot_SetDefaultAppearance (FSCRT_ANNOT annot, const FSPDF_DEFAULTAPPEARANCE *defAppearance)
 Set default appearance of a free text annotation, which can be used in formatting the text. More...
 
FS_RESULT FSPDF_Annot_SetIconFit (FSCRT_ANNOT annot, const FSPDF_ANNOTICONFIT *iconFit)
 Set icon fit of a widget annotation. More...
 
FS_RESULT FSPDF_Annot_RemoveMKEntry (FSCRT_ANNOT annot, FS_INT32 mkEntry)
 Remove a specified entry in MK dictionary. More...
 
FS_RESULT FSPDF_Annot_SetMKRotation (FSCRT_ANNOT annot, FS_INT32 degree)
 Set rotation in MK dictionary. More...
 
FS_RESULT FSPDF_Annot_SetMKColor (FSCRT_ANNOT annot, FS_INT32 mkEntry, FS_ARGB color)
 Set color of specific type in MK dictionary. More...
 
FS_RESULT FSPDF_Annot_SetMKCaption (FSCRT_ANNOT annot, FS_INT32 mkEntry, const FSCRT_BSTR *caption)
 Set caption of a specific type in MK dictionary. More...
 
FS_RESULT FSPDF_Annot_SetMKIconBitmap (FSCRT_ANNOT annot, FS_INT32 mkEntry, FSCRT_BITMAP bitmap)
 Set a bitmap to a specific icon entry in MK dictionary. More...
 
FS_RESULT FSPDF_Annot_SetMKIconImage (FSCRT_ANNOT annot, FS_INT32 mkEntry, FSCRT_IMAGE image)
 Set an image to a specific icon entry in MK dictionary. More...
 
FS_RESULT FSPDF_Annot_SetIconProvider (FSPDF_ICONPROVIDER *iconProvider)
 Set icon provider to SDK management. More...
 
FS_RESULT FSPDF_Annot_SetStamp (FSCRT_ANNOT annot, FSCRT_IMAGE image, FS_INT32 compress)
 Set image to stamp annotation. More...
 
FS_RESULT FSPDF_Annot_SetStampWithBitmap (FSCRT_ANNOT annot, FSCRT_BITMAP bitmap)
 Set bitmap to stamp annotation. More...
 
FS_RESULT FSPDF_Annot_AddState (FSCRT_ANNOT annot, FS_INT32 stateModel, FS_INT32 state, FSCRT_ANNOT *stateAnnot)
 Add a specific state to a markup annotation. More...
 
FS_RESULT FSPDF_Annot_SetState (FSCRT_ANNOT stateAnnot, FS_INT32 stateModel, FS_INT32 state)
 Set state model and state out of a state annotation. More...
 
FS_RESULT FSPDF_Annot_RemoveAllStates (FSCRT_ANNOT annot)
 Remove all the state annotations associated with an annotation. More...
 
FS_RESULT FSPDF_Annot_SetGroup (FSCRT_ANNOT *annots, FS_INT32 count, FS_INT32 headerIndex)
 Group all the input annotations. More...
 
FS_RESULT FSPDF_Annot_Ungroup (FSCRT_ANNOT annot)
 Ungroup an annotation from the group it belongs to. More...
 
FS_RESULT FSPDF_Annot_InsertReply (FSCRT_ANNOT annot, FS_INT32 index, FSCRT_ANNOT *replyAnnot)
 Insert a new empty reply with a specified index to a markup annotation. More...
 
FS_RESULT FSPDF_Annot_RemoveReply (FSCRT_ANNOT annot, FS_INT32 index)
 Remove a reply with specified index to a markup annotation. More...
 
FS_RESULT FSPDF_Annot_RemoveAllReplies (FSCRT_ANNOT annot)
 Remove all the replies of a markup annotation. More...
 
FS_RESULT FSPDF_Annot_SetAction (FSCRT_ANNOT annot, FS_INT32 trigger, FS_INT32 index, const FSPDF_ACTIONDATA *actionData)
 Set action data of specified index associated with an annotation. More...
 
FS_RESULT FSPDF_Annot_InsertAction (FSCRT_ANNOT annot, FS_INT32 trigger, FS_INT32 index, const FSPDF_ACTIONDATA *actionData)
 Insert an action of specified index associated with an annotation. More...
 
FS_RESULT FSPDF_Annot_RemoveAction (FSCRT_ANNOT annot, FS_INT32 trigger, FS_INT32 index)
 Remove an action of specified index associated with an annotation. More...
 
FS_RESULT FSPDF_Annot_RemoveAllActions (FSCRT_ANNOT annot, FS_INT32 trigger)
 Remove all the actions associated with an annotation. More...
 
FS_RESULT FSPDF_Annot_ResetAppearance (FSCRT_ANNOT annot)
 Reset(regenerate) appearance of an annotation. More...
 
FS_RESULT FSPDF_Archive_SerializeAnnot (FSCRT_ARCHIVE archive, FSCRT_PAGE page, FSCRT_ANNOT annot)
 Serialize the annotation. More...
 
FS_RESULT FSPDF_Archive_DeserializeAnnot (FSCRT_ARCHIVE archive, FSCRT_PAGE page, FSCRT_ANNOT *annot)
 De-serialize the annotation. More...
 

Macro Definitions for Annotation Types

Note
Annotation types are used as parameter like filter or type in some functions.
#define FSPDF_ANNOTTYPE_TEXT   "Text"
 Text annotation, markup type.
 
#define FSPDF_ANNOTTYPE_LINK   "Link"
 Link annotation.
 
#define FSPDF_ANNOTTYPE_FREETEXT   "FreeText"
 Free text annotation, markup type.
 
#define FSPDF_ANNOTTYPE_LINE   "Line"
 Line annotation, markup type.
 
#define FSPDF_ANNOTTYPE_SQUARE   "Square"
 Square annotation, markup type.
 
#define FSPDF_ANNOTTYPE_CIRCLE   "Circle"
 Circle annotation, markup type.
 
#define FSPDF_ANNOTTYPE_POLYGON   "Polygon"
 Polygon annotation, markup type.
 
#define FSPDF_ANNOTTYPE_POLYLINE   "PolyLine"
 Polyline annotation, markup type.
 
#define FSPDF_ANNOTTYPE_HIGHLIGHT   "Highlight"
 Highlight annotation, markup type.
 
#define FSPDF_ANNOTTYPE_UNDERLINE   "Underline"
 Underline annotation, markup type.
 
#define FSPDF_ANNOTTYPE_SQUIGGLY   "Squiggly"
 Squiggly-underline annotation, markup type.
 
#define FSPDF_ANNOTTYPE_STRIKEOUT   "StrikeOut"
 Strikeout annotation, markup type.
 
#define FSPDF_ANNOTTYPE_STAMP   "Stamp"
 Rubber stamp annotation, markup type.
 
#define FSPDF_ANNOTTYPE_CARET   "Caret"
 Caret annotation, markup type.
 
#define FSPDF_ANNOTTYPE_INK   "Ink"
 Ink annotation, markup type.
 
#define FSPDF_ANNOTTYPE_POPUP   "Popup"
 Pop-up annotation.
 
#define FSPDF_ANNOTTYPE_FILEATTACHMENT   "FileAttachment"
 File attachment annotation, markup type.
 
#define FSPDF_ANNOTTYPE_SOUND   "Sound"
 Sound annotation, markup type. More...
 
#define FSPDF_ANNOTTYPE_MOVIE   "Movie"
 Movie annotation. More...
 
#define FSPDF_ANNOTTYPE_WIDGET   "Widget"
 Widget annotation. More...
 
#define FSPDF_ANNOTTYPE_SCREEN   "Screen"
 Screen annotation. More...
 
#define FSPDF_ANNOTTYPE_PRINTERMARK   "PrinterMark"
 Printer's mark annotation. More...
 
#define FSPDF_ANNOTTYPE_TRAPNET   "TrapNet"
 Trap network annotation. More...
 
#define FSPDF_ANNOTTYPE_WATERMARK   "Watermark"
 Watermark annotation. More...
 
#define FSPDF_ANNOTTYPE_PSI   "PSInk"
 Pressure Sensitive Ink annotation. Currently not support. More...
 
#define FSPDF_ANNOTTYPE_3D   "3D"
 3D annotation. More...
 

Macro Definitions for Annotation Flags

#define FSPDF_ANNOTFLAG_INVISIBLE   0x0001
 Annotation flag: invisible.
 
#define FSPDF_ANNOTFLAG_HIDDEN   0x0002
 Annotation flag: hidden.
 
#define FSPDF_ANNOTFLAG_PRINT   0x0004
 Annotation flag: print.
 
#define FSPDF_ANNOTFLAG_NOZOOM   0x0008
 Annotation flag: no zoom.
 
#define FSPDF_ANNOTFLAG_NOROTATE   0x0010
 Annotation flag: no rotate.
 
#define FSPDF_ANNOTFLAG_NOVIEW   0x0020
 Annotation flag: no view.
 
#define FSPDF_ANNOTFLAG_READONLY   0x0040
 Annotation flag: read only.
 
#define FSPDF_ANNOTFLAG_LOCKED   0x0080
 Annotation flag: locked.
 
#define FSPDF_ANNOTFLAG_TOGGLENOVIEW   0x0100
 Annotation flag: toggle no view.
 
#define FSPDF_ANNOTFLAG_LOCKEDCONTENTS   0x0200
 Annotation flag: locked contents.
 

Macro Definitions for Icon Names

#define FSPDF_ANNOT_ICONNAME_TEXT_CHECKMARK   "Checkmark"
 Note icon type: Checkmark.
 
#define FSPDF_ANNOT_ICONNAME_TEXT_CIRCLE   "Circle"
 Note icon type: Circle.
 
#define FSPDF_ANNOT_ICONNAME_TEXT_COMMENT   "Comment"
 Note icon type: Comment.
 
#define FSPDF_ANNOT_ICONNAME_TEXT_CROSS   "Cross"
 Note icon type: Cross.
 
#define FSPDF_ANNOT_ICONNAME_TEXT_HELP   "Help"
 Note icon type: Help.
 
#define FSPDF_ANNOT_ICONNAME_TEXT_INSERT   "Insert"
 Note icon type: Insert.
 
#define FSPDF_ANNOT_ICONNAME_TEXT_KEY   "Key"
 Note icon type: Key.
 
#define FSPDF_ANNOT_ICONNAME_TEXT_NEWPARAGRAPH   "NewParagraph"
 Note icon type: New Paragraph.
 
#define FSPDF_ANNOT_ICONNAME_TEXT_NOTE   "Note"
 Note icon type: Note.
 
#define FSPDF_ANNOT_ICONNAME_TEXT_PARAGRAPH   "Paragraph"
 Note icon type: Paragraph.
 
#define FSPDF_ANNOT_ICONNAME_TEXT_RIGHARROW   "RightArrow"
 Note icon type: Right Arrow.
 
#define FSPDF_ANNOT_ICONNAME_TEXT_RIGHPOINTER   "RightPointer"
 Note icon type: Right Pointer.
 
#define FSPDF_ANNOT_ICONNAME_TEXT_STAR   "Star"
 Note icon type: Star.
 
#define FSPDF_ANNOT_ICONNAME_TEXT_UPARROW   "UpArrow"
 Note icon type: Up Arrow.
 
#define FSPDF_ANNOT_ICONNAME_TEXT_UPLEFTARROW   "UpleftArrow"
 Note icon type: Up-left Arrow.
 
#define FSPDF_ANNOT_ICONNAME_FILEATTACH_GRAPH   "Graph"
 File attachment icon type: Graph.
 
#define FSPDF_ANNOT_ICONNAME_FILEATTACH_PAPERCLIP   "Paperclip"
 File attachment icon type: PaperClip.
 
#define FSPDF_ANNOT_ICONNAME_FILEATTACH_PUSHPIN   "PushPin"
 File attachment icon type: PushPin.
 
#define FSPDF_ANNOT_ICONNAME_FILEATTACH_TAG   "Tag"
 File attachment icon type: Tag.
 
#define FSPDF_ANNOT_ICONNAME_STAMP_APPROVED   "Approved"
 Stamp annotation icon type: Approved.
 
#define FSPDF_ANNOT_ICONNAME_STAMP_ASIS   "AsIs"
 Stamp annotation icon type: AsIs.
 
#define FSPDF_ANNOT_ICONNAME_STAMP_CONFIDENTIAL   "Confidential"
 Stamp annotation icon type: Confidential.
 
#define FSPDF_ANNOT_ICONNAME_STAMP_DEPARTMENTAL   "Departmental"
 Stamp annotation icon type: Departmental.
 
#define FSPDF_ANNOT_ICONNAME_STAMP_DRAFT   "Draft"
 Stamp annotation icon type: Draft.
 
#define FSPDF_ANNOT_ICONNAME_STAMP_EXPERIMENTAL   "Experimental"
 Stamp annotation icon type: Experimental.
 
#define FSPDF_ANNOT_ICONNAME_STAMP_EXPIRED   "Expired"
 Stamp annotation icon type: Expired.
 
#define FSPDF_ANNOT_ICONNAME_STAMP_FINAL   "Final"
 Stamp annotation icon type: Final.
 
#define FSPDF_ANNOT_ICONNAME_STAMP_FORCOMMENT   "ForComment"
 Stamp annotation icon type: ForComment.
 
#define FSPDF_ANNOT_ICONNAME_STAMP_FORPUBLICRELEASE   "ForPublicRelease"
 Stamp annotation icon type: ForPublicRelease.
 
#define FSPDF_ANNOT_ICONNAME_STAMP_NOTAPPROVED   "NotApproved"
 Stamp annotation icon type: NotApproved.
 
#define FSPDF_ANNOT_ICONNAME_STAMP_NOTFORPUBLICRELEASE   "NotForPublicRelease"
 Stamp annotation icon type: NotForPublicRelease.
 
#define FSPDF_ANNOT_ICONNAME_STAMP_SOLD   "Sold"
 Stamp annotation icon type: Sold.
 
#define FSPDF_ANNOT_ICONNAME_STAMP_TOPSECRET   "TopSecret"
 Stamp annotation icon type: TopSecret.
 
#define FSPDF_ANNOT_ICONNAME_SOUND_SPEAKER   "Speaker"
 Sound annotation icon type: Speaker.
 
#define FSPDF_ANNOT_ICONNAME_SOUND_MIC   "Mic"
 Sound annotation icon type: Mic.
 

Macro Definitions for Intent Names

#define FSPDF_ANNOT_INTENTNAME_FREETEXT_CALLOUT   "FreeTextCallout"
 FreeText annotation intent name: FreeTextCallout.
 
#define FSPDF_ANNOT_INTENTNAME_FREETEXT_TYPEWRITER   "FreeTextTypewriter"
 FreeText annotation intent name: FreeTextTypewriter.
 
#define FSPDF_ANNOT_INTENTNAME_LINE_ARROW   "LineArrow"
 Line annotation intent name: LineArrow.
 
#define FSPDF_ANNOT_INTENTNAME_LINE_DIMENSION   "LineDimension"
 Line annotation intent name: LineDimension.
 
#define FSPDF_ANNOT_INTENTNAME_POLYGON_CLOUD   "PolygonCloud"
 Polygon annotation intent name: PolygonCloud.
 
#define FSPDF_ANNOT_INTENTNAME_POLYGON_DIMENSION   "PolygonDimension"
 Polygon annotation intent name: PolygonDimension.
 
#define FSPDF_ANNOT_INTENTNAME_POLYLINE_DIMENSION   "PolyLineDimension"
 PolyLine annotation intent name: PolyLineDimension.
 

Macro Definitions for Line Ending Styles

#define FSPDF_ANNOT_LINEENDINGSTYLE_NONE   "None"
 Line annotation ending style name: None.
 
#define FSPDF_ANNOT_LINEENDINGSTYLE_SQUARE   "Square"
 Line annotation ending style name: Square.
 
#define FSPDF_ANNOT_LINEENDINGSTYLE_CIRCLE   "Circle"
 Line annotation ending style name: Circle.
 
#define FSPDF_ANNOT_LINEENDINGSTYLE_DIAMOND   "Diamond"
 Line annotation ending style name: Diamond.
 
#define FSPDF_ANNOT_LINEENDINGSTYLE_OPENARROW   "OpenArrow"
 Line annotation ending style name: OpenArrow.
 
#define FSPDF_ANNOT_LINEENDINGSTYLE_CLOSEDARROW   "ClosedArrow"
 Line annotation ending style name: ClosedArrow.
 
#define FSPDF_ANNOT_LINEENDINGSTYLE_BUTT   "Butt"
 Line annotation ending style name: Butt.
 
#define FSPDF_ANNOT_LINEENDINGSTYLE_REVERSEOPENARROW   "ROpenArrow"
 Line annotation ending style name: ROpenArrow.
 
#define FSPDF_ANNOT_LINEENDINGSTYLE_REVERSECLOSEDARROW   "RClosedArrow"
 Line annotation ending style name: RClosedArrow.
 
#define FSPDF_ANNOT_LINEENDINGSTYLE_SLASH   "Slash"
 Line annotation ending style name: Slash.
 

Macro Definitions for Highlighting Modes

#define FSPDF_ANNOT_HIGHLIGHTINGMODE_NONE   0
 Highlighting mode: None.
 
#define FSPDF_ANNOT_HIGHLIGHTINGMODE_INVERT   1
 Highlighting mode: Invert.
 
#define FSPDF_ANNOT_HIGHLIGHTINGMODE_OUTLINE   2
 Highlighting mode: Outline.
 
#define FSPDF_ANNOT_HIGHLIGHTINGMODE_PUSH   3
 Highlighting mode: Push.
 
#define FSPDF_ANNOT_HIGHLIGHTINGMODE_TOGGLE   4
 Highlighting mode: Toggle. More...
 

Macro Definitions for Border Style

#define FSPDF_ANNOT_BORDERSTYLE_SOLID   0
 Border style: Solid.
 
#define FSPDF_ANNOT_BORDERSTYLE_DASHED   1
 Border style: Dashed.
 
#define FSPDF_ANNOT_BORDERSTYLE_UNDERLINE   2
 Border style: Underline.
 
#define FSPDF_ANNOT_BORDERSTYLE_BEVELED   3
 Border style: Beveled.
 
#define FSPDF_ANNOT_BORDERSTYLE_INSET   4
 Border style: Inset.
 
#define FSPDF_ANNOT_BORDERSTYLE_CLOUDY   5
 Border style: Cloudy.
 

Macro Definitions for Icon Fit Flags

#define FSPDF_ANNOT_ICONFITFLAG_SCALEWAY   1
 Icon fit flag: Scale way.
 
#define FSPDF_ANNOT_ICONFITFLAG_ASPECTRATIO   2
 Icon fit flag: Aspect ratio.
 
#define FSPDF_ANNOT_ICONFITFLAG_POSITION   4
 Icon fit flag: Set position.
 
#define FSPDF_ANNOT_ICONFITFLAG_FITBOUNDS   8
 Icon fit flag: Fit boundaries.
 

Macro Definitions for Icon Scale Way

#define FSPDF_ANNOT_ICONSCALEWAY_ALWAYS   0
 A: Always scale.
 
#define FSPDF_ANNOT_ICONSCALEWAY_BIGGER   1
 B: Scale only when icon is bigger than annotation rectangle.
 
#define FSPDF_ANNOT_ICONSCALEWAY_SMALLER   2
 S: Scale only when icon is smaller than annotation rectangle.
 
#define FSPDF_ANNOT_ICONSCALEWAY_NEVER   3
 N: Never scale.
 

Macro Definitions for Entries in Appearance Characteristics (MK)

#define FSPDF_ANNOT_MKENTRY_ROTATION   0
 Entry of appearance characteristics dictionary: R.
 
#define FSPDF_ANNOT_MKENTRY_BORDERCOLOR   1
 Entry of appearance characteristics dictionary: BC.
 
#define FSPDF_ANNOT_MKENTRY_BACKGROUNDCOLOR   2
 Entry of appearance characteristics dictionary: BG.
 
#define FSPDF_ANNOT_MKENTRY_NORMALCAPTION   3
 Entry of appearance characteristics dictionary: CA, only for widget annotation with any button fields.
 
#define FSPDF_ANNOT_MKENTRY_ROLLOVERCAPTION   4
 Entry of appearance characteristics dictionary: RC, only for widget annotation with pushbutton fields.
 
#define FSPDF_ANNOT_MKENTRY_DOWNCAPTION   5
 Entry of appearance characteristics dictionary: AC, only for widget annotation with pushbutton fields.
 
#define FSPDF_ANNOT_MKENTRY_NORMALICON   6
 Entry of appearance characteristics dictionary: I, only for widget annotation with pushbutton fields.
 
#define FSPDF_ANNOT_MKENTRY_ROLLOVERICON   7
 Entry of appearance characteristics dictionary: RI, only for widget annotation with pushbutton fields.
 
#define FSPDF_ANNOT_MKENTRY_DOWNICON   8
 Entry of appearance characteristics dictionary: IX, only for widget annotation with pushbutton fields.
 
#define FSPDF_ANNOT_MKENTRY_ICONFIT   9
 Entry of appearance characteristics dictionary: IF, only for widget annotation with pushbutton fields.
 
#define FSPDF_ANNOT_MKENTRY_TEXTPOSITION   10
 Entry of appearance characteristics dictionary: TP, only for widget annotation with pushbutton fields.
 

Macro Definition for Annotation State Model

#define FSPDF_ANNOTSTATEMODEL_MARKED   0
 State model is marked.
 
#define FSPDF_ANNOTSTATEMODEL_REVIEW   1
 State model is review.
 

Macro Definition for Annotation Marked State

These are meaningful when state model is FSPDF_ANNOTSTATEMODEL_MARKED.

#define FSPDF_ANNOTSTATE_MARKED_MARKED   0
 The state of marked model is marked.
 
#define FSPDF_ANNOTSTATE_MARKED_UNMARKED   1
 The state of marked model is unmarked.
 
#define FSPDF_ANNOTSTATE_REVIEW_ACCEPTED   0
 The state of review model is accepted.
 
#define FSPDF_ANNOTSTATE_REVIEW_REJECTED   1
 The state of review model is rejected.
 
#define FSPDF_ANNOTSTATE_REVIEW_CANCELLED   2
 The state of review model is canceled.
 
#define FSPDF_ANNOTSTATE_REVIEW_COMPLETED   3
 The state of review model is completed.
 
#define FSPDF_ANNOTSTATE_REVIEW_NONE   4
 The state of review model is none.
 

Detailed Description

Definitions for PDF annotations access.
Definitions and functions in this module are included in fpdf_annot_r.h and fpdf_annot_w.h.
Module: PDFAnnot
License Identifier: PDFAnnot/All
Available License Right: Reading/Writing
For License Right Reading, see fpdf_annot_r.h.
For License Right Writing, see fpdf_annot_w.h.

This module contains following features:

Macro Definition Documentation

#define FSPDF_ANNOT_HIGHLIGHTINGMODE_TOGGLE   4

Highlighting mode: Toggle.

This only supports widget annotation.

#define FSPDF_ANNOTTYPE_3D   "3D"

3D annotation.

Note
Currently, Foxit PDF SDK only provides functions for common access to 3D annotation.
#define FSPDF_ANNOTTYPE_MOVIE   "Movie"

Movie annotation.

Note
Currently, Foxit PDF SDK only provides functions for common access to movie annotation.
#define FSPDF_ANNOTTYPE_PRINTERMARK   "PrinterMark"

Printer's mark annotation.

Note
Currently, Foxit PDF SDK only provides functions for common access to printer's mark annotation.
#define FSPDF_ANNOTTYPE_PSI   "PSInk"

Pressure Sensitive Ink annotation. Currently not support.

Note
In current module, Foxit PDF SDK only provides functions for common access to pressure sensitive ink annotation.
For pressure sensitive ink annotation, please refer to PDF Watermark module.
#define FSPDF_ANNOTTYPE_SCREEN   "Screen"

Screen annotation.

Note
Currently, Foxit PDF SDK only provides functions for common access to screen annotation.
#define FSPDF_ANNOTTYPE_SOUND   "Sound"

Sound annotation, markup type.

Note
Currently, Foxit PDF SDK only provides functions for common access to sound annotation.
#define FSPDF_ANNOTTYPE_TRAPNET   "TrapNet"

Trap network annotation.

Note
Currently, Foxit PDF SDK only provides functions for common access to trap network annotation.
#define FSPDF_ANNOTTYPE_WATERMARK   "Watermark"

Watermark annotation.

Note
In current module, Foxit PDF SDK only provides functions for common access to watermark annotation.
For watermark annotation, please refer to PDF Watermark module.
#define FSPDF_ANNOTTYPE_WIDGET   "Widget"

Widget annotation.

Note
In current module, Foxit PDF SDK only provides functions for common access to widget annotation.
For widget related to form object, please refer to PDF Form module.

Function Documentation

FS_RESULT FSPDF_Annot_Add ( FSCRT_PAGE  page,
const FSCRT_RECTF rect,
const FSCRT_BSTR annotType,
const FSCRT_BSTR filter,
FS_INT32  index,
FSCRT_ANNOT *  annot 
)

Add an annotation with a specific index, by specific filter.

This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX, except PSInk, 3D, PrinterMark, TrapNet, Sound, Movie, Screen, Watermark and Widget annotations.
For widget annotation, user is strongly suggested to use functions in PDF Form module for widget related to form object.
For watermark annotation, user is suggested to use functions in PDF Watermark module for most operations of watermark.
For PSInk annotation, user should use function FSCRT_PSI_ConvertToPDFAnnot in Pressure Sensitive Ink to generate a PSInk annotation from a PSI object.

Parameters
[in]pageHandle to a FSCRT_PAGE object which is a PDF page object.
[in]rectPointer to a FSCRT_RECTF object to specify the rectangle of an annotation, in PDF page coordinate system.
The value can be set as (0,0,0,0) except for the following annotation types: FSPDF_ANNOTTYPE_TEXT, FSPDF_ANNOTTYPE_FREETEXT, FSPDF_ANNOTTYPE_SQUARE, FSPDF_ANNOTTYPE_CIRCLE, FSPDF_ANNOTTYPE_FILEATTACHMENT, FSPDF_ANNOTTYPE_STAMP, FSPDF_ANNOTTYPE_CARET.
[in]annotTypePointer to a FSCRT_BSTR object to specify the type of an annotation. Please refer to macro definitions FSPDF_ANNOTTYPE_XXX and this should be one of these macros.
This should be in the type range defined by parameter filter.
[in]filterPointer to a filter string.
If it is NULL, parameter index is to all existing annotation.
If it is a valid pointer to FSCRT_BSTR, it specifies the annotation type:
  • For single type filter: Please refer to macro definitions FSPDF_ANNOTTYPE_XXX and it should be one of these macros.
  • For multiple types filter: Use comma to separate different types, for example, "Text, Link, Circle".
[in]indexThe index that this new annotation is to be added in. Range: 0 to (annotcount-1). annotcount is returned by function FSPDF_Annot_GetCount with same filter.
If this is out of the count range(according to parameter filter), the new annotation will be added to the last within the range defined by parameter filter.
[out]annotPointer to a FSCRT_ANNOT handle that receives the newly added annotation. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter page, annotType, or annot is NULL, or parameter rect is empty for text, freetext, square, circle, file attachment, stamp, or caret annotations.
FSCRT_ERRCODE_INVALIDTYPE if parameter page is not a type of PDF page.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNKNOWNSTATE if annotations in parameter page have not been loaded.
FSCRT_ERRCODE_UNSUPPORTED if parameter annotType is not supported currently.
FSCRT_ERRCODE_ERROR if annotations cannot be added because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • page: this handle is long-term partially recoverable.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_AddState ( FSCRT_ANNOT  annot,
FS_INT32  stateModel,
FS_INT32  state,
FSCRT_ANNOT *  stateAnnot 
)

Add a specific state to a markup annotation.

This function only supports markup annotations.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]stateModelAn integer value that specifies the state model. Please refer to macro definitions FSPDF_ANNOTSTATEMODEL_XXX and this should be one of these macros.
[in]stateAn integer value that specifies the state. Please refer to macro definitions FSPDF_ANNOTSTATE_XXX and this should be one of these macros.
[out]stateAnnotPointer to a FSCRT_ANNOT handle which receive the state annotation. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot or stateAnnot is NULL, or stateModel, state is invalid.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the specified state annotation cannot be added because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
  • stateAnnot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_CountActions ( FSCRT_ANNOT  annot,
FS_INT32  trigger,
FS_INT32 count 
)

Count actions associated with an annotation.

Only link , screen and widget annotations can have action.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]triggerThe trigger of action. Please refer to macro definition FSPDF_TRIGGER_ANNOT_XXX and this should be one of these macros.
[out]countPointer to a FS_INT32 object that receives count of actions. If there is any error, it will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or count is NULL, or trigger is invalid.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if actions cannot be counted because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_CountReplies ( FSCRT_ANNOT  annot,
FS_INT32 count 
)

Count replies of a markup annotation.

This function only supports markup annotations.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]countPointer to a FS_INT32 object which that receives count of replies. If there is any error, it will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or count is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if cannot count replies because of any other reason.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_CountStateAnnots ( FSCRT_ANNOT  annot,
FS_INT32  stateModel,
FS_INT32 count 
)

Count specific state annotations associated with a markup annotation.

This function only supports markup annotations. The markup annotations may have an author-specific state associated with them. The state is not specified in the annotation itself but in a separate text annotation that refers to the original annotation by means of its IRT entry. This function provided to count these state text annotations with the specific state model. For more details, please refer to PDF Reference 1.7 P620 "Annotation States".

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an markup annotation object.
[in]stateModelAn integer value that specifies state model. Please refer to macro definitions FSPDF_ANNOTSTATEMODEL_XXX and this should be one of these macros.
[out]countPointer to a FS_INT32 object that receives count of state annotations. If there is any error, it will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or count is NULL, or stateModel is invalid.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if specific state annotations cannot be counted because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_Get ( FSCRT_PAGE  page,
const FSCRT_BSTR filter,
FS_INT32  index,
FSCRT_ANNOT *  annot 
)

Get annotation with specified index, by specific filter.

This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX.

Parameters
[in]pageHandle to a FSCRT_PAGE object which is a PDF page object.
[in]filterPointer to a filter string.
If it is NULL or filter->str is NULL or filter->len is less than 1, this function will get annotation from all annotations. If it is a valid pointer to FSCRT_BSTR, it specifies annotation type:
  • For single type filter: Please refer to macro definitions FSPDF_ANNOTTYPE_XXX and it should be one of these macros.
  • For multiple types filter: Use comma to separate different types, for example, "Text, Link, Circle".
[in]indexA zero-based index of annotation to be got. Range: 0 to (annotCount-1). annotcount is returned by function FSPDF_Annot_GetCount with same filter.
[out]annotPointer to a FSCRT_ANNOT handle that receives specific annotation. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter page, or annot is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_INVALIDTYPE if parameter page is not a type of PDF page.
FSCRT_ERRCODE_NOTFOUND if parameter index is out of range or there are no annotations.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNKNOWNSTATE if annotations in parameter page are not loaded.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • page: this handle is long-term partially recoverable.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetAction ( FSCRT_ANNOT  annot,
FS_INT32  trigger,
FS_INT32  index,
FSPDF_ACTIONDATA actionData 
)

Get action data of specific index associated with an annotation.

Only link , screen and widget annotations can have action.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]triggerThe trigger of action. Please refer to macro definition FSPDF_TRIGGER_ANNOT_XXX and this should be one of these macros.
[in]indexThe index of actions. Range: 0 to (actioncount-1). actioncount is returned by function FSPDF_Annot_CountActions.
[out]actionDataPointer to a FSPDF_ACTIONDATA structure that receives action data.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot or actionData is NULL, or trigger is invalid.
FSCRT_ERRCODE_NOTFOUND if parameter index is out of range or no action is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if action data cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetAlignment ( FSCRT_ANNOT  annot,
FS_INT32 alignment 
)

Get alignment of a free text annotation.

Only free text annotation can have alignment property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]alignmentPointer to a FS_INT32 object that receives value of alignment property. It would be one of the following values:
  • 0: Left-justified
  • 1: Centered
  • 2: Right-justified
If there is any error, it will be set -1.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot or alignment is NULL.
FSCRT_ERRCODE_NOTFOUND if no alignment (justification) property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if alignment cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetAllByTabOrder ( FSCRT_PAGE  page,
const FSCRT_BSTR filter,
FSCRT_ANNOT *  annotArray,
FS_INT32 count 
)

Get annotations by tab order, with specific filter (except pop-up annotation).

This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX except FSPDF_ANNOTTYPE_POPUP.
It needs to be called twice to get annotArray:
For the first time, set parameter annotArray to NULL to get the actual size of annotations to be got. The count value will be set to parameter count as a result returned by the first calling.
Then use count to allocate annotArray.
For the second time, input the allocated annotArray and its size count to get the annotArray. When this function returns successfully, annotArray will get the annot array and count will get the actual count.
The size of the input array should not be less than the actual count, and the parameter count shall not be empty.

Parameters
[in]pageHandle to a FSCRT_PAGE object which is a PDF page object.
[in]filterPointer to a filter string.
If it is NULL, this function will get annotations by tab order from all annotations. If it is a valid pointer to FSCRT_BSTR, it specifies annotation type:
  • For single type filter: Please refer to macro definitions FSPDF_ANNOTTYPE_XXX and it should be one of these macros.
  • For multiple types filter: Use comma to separate different types, for example, "Text, Link, Circle".
[out]annotArrayPointer to a FSCRT_ANNOT handle array that receives specific annotation. If there is any error, it will be NULL.
[in,out]countPointer to a FS_INT32 object.
When this function is called, it should be the size of parameter annotArray if parameter annotArray is not NULL.
When this function returns, it will receive the actual count of annotations which are got.
Please see detail description about how to use this function.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter page or count is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_INVALIDTYPE if parameter page is not a type of PDF page.
FSCRT_ERRCODE_NOTFOUND if no annotation is found with specific filter.
FSCRT_ERRCODE_BUFFEROVERFLOW if parameter annotArray is valid but count is less than required amount.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if annots cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • page: this handle is long-term partially recoverable.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetAtDevicePos ( FSCRT_PAGE  page,
const FSCRT_BSTR filter,
const FSCRT_MATRIX matrix,
FS_INT32  x,
FS_INT32  y,
FS_INT32  tolerance,
FSCRT_ANNOT *  annot 
)

Get annotation at a specific position in device (in pixel), by specific filter.

This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX.

Parameters
[in]pageHandle to a FSCRT_PAGE object which is a PDF page object.
[in]filterPointer to a filter string.
If it is NULL, this function will get all annotations. If it is a valid pointer to FSCRT_BSTR, it specifies annotation type:
  • For single type filter: Please refer to macro definitions FSPDF_ANNOTTYPE_XXX and it should be one of these macros.
  • For multiple types filter: Use comma to separate different types, for example, "Text, Link, Circle".
[in]matrixA matrix used to transform from device coordinate system to PDF page coordinate system.
[in]xHorizontal position in device coordinate system (in pixel).
[in]yVertical position in device coordinate system (in pixel).
[in]toleranceTolerance value for point, in device coordinate system. Valid value: from 0.0f to 30.0f.
[out]annotPointer to a FSCRT_ANNOT handle that receives specified annotation. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter page, matrix, or annot is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_INVALIDTYPE if parameter page is not a type of PDF page.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_NOTFOUND if there is no annotations.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_UNKNOWNSTATE if annotations in parameter page are not loaded.
FSCRT_ERRCODE_ERROR if annotation cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • page: this handle is long-term partially recoverable.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetAtPos ( FSCRT_PAGE  page,
const FSCRT_BSTR filter,
FS_FLOAT  x,
FS_FLOAT  y,
FS_FLOAT  tolerance,
FSCRT_ANNOT *  annot 
)

Get annotation at a specific position in PDF page, by specific filter.

This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX.

Parameters
[in]pageHandle to a FSCRT_PAGE object which is a PDF page object.
[in]filterPointer to a filter string.
If it is NULL, this function will get annotation from all annotations. If it is a valid pointer to FSCRT_BSTR, it specifies annotation type:
  • For single type filter: Please refer to macro definitions FSPDF_ANNOTTYPE_XXX and it should be one of these macros.
  • For multiple types filter: Use comma to separate different types, for example, "Text, Link, Circle".
[in]xHorizontal position in PDF page coordinate system.
[in]yVertical position in PDF page coordinate system.
[in]toleranceTolerance value for point, in PDF page coordinate system. Valid value: from 0.0f to 30.0f.
[out]annotPointer to a FSCRT_ANNOT handle that receives specified annotation. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter page, or annot is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_INVALIDTYPE if parameter page is not a type of PDF page.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_NOTFOUND if there is no annotations.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_UNKNOWNSTATE if annotations in parameter page are not loaded.
FSCRT_ERRCODE_ERROR if annotation cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • page: this handle is long-term partially recoverable.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetAttachment ( FSCRT_ANNOT  annot,
FSPDF_ATTACHMENT *  attachment 
)

Get attachment of a file attachment annotation.

Only file attachment annotation can have attachment property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]attachmentPointer to a FSPDF_ATTACHMENT handle to receive a PDF attachment handle if successful.
If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or attachment is NULL.
FSCRT_ERRCODE_NOTFOUND if no attachment property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if attachment cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
  • attachment: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetBorder ( FSCRT_ANNOT  annot,
FSPDF_ANNOTBORDER border 
)

Get border of an annotation.

This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]borderPointer to a FSPDF_ANNOTBORDER structure that receives border information.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or border is NULL.
FSCRT_ERRCODE_NOTFOUND if no border property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if border cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetCalloutLinePoints ( FSCRT_ANNOT  annot,
FS_FLOAT x1,
FS_FLOAT y1,
FS_FLOAT x2,
FS_FLOAT y2,
FS_FLOAT x3,
FS_FLOAT y3 
)

Get callout line points of a free text annotation.

Only free text annotation can have callout line points property.
Callout line points property can have 4 or 6 numbers:

  • 6 numbers represent the starting, knee point, and ending coordinates of a line annotation in PDF page space.
  • 4 numbers represent the starting and ending coordinates of a line annotation. In this situation, parameter x3 and y3 will have the same value as x2 and y2.
Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]x1Pointer to a FS_FLOAT object that receives first x position. If there is any error, it will be set 0.
[out]y1Pointer to a FS_FLOAT object that receives first y position. If there is any error, it will be set 0.
[out]x2Pointer to a FS_FLOAT object that receives second x position. If there is any error, it will be set 0.
[out]y2Pointer to a FS_FLOAT object that receives second y position. If there is any error, it will be set 0.
[out]x3Pointer to a FS_FLOAT object that receives third x position. If there is any error, it will be set 0.
[out]y3Pointer to a FS_FLOAT object that receives third y position. If there is any error, it will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, x1, y1, x2, y2, x3, or y3 is NULL.
FSCRT_ERRCODE_NOTFOUND if no callout line points property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if callout line points cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetCaptionOffset ( FSCRT_ANNOT  annot,
FS_FLOAT offsetx,
FS_FLOAT offsety 
)

Get caption offset of a line annotation.

Only line annotation can have caption offset property.
Caption offset is the offset of caption from its normal position. It is meaningful only when key "Cap" is true, which can be checked by function FSPDF_Annot_HasCaptionContents.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]offsetxPointer to a FS_FLOAT object that receives horizontal offset along annotation line from its midpoint:
  • A positive value indicates offset to the right.
  • A negative value indicates offset to the left.
If there is any error, it will be set 0.
[out]offsetyPointer to a FS_FLOAT object that receives vertical offset perpendicular to annotation line:
  • A positive value indicates a shift up.
  • A negative value indicates a shift down.
If there is any error, it will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, offsetx or offsety is NULL.
FSCRT_ERRCODE_NOTFOUND if no valid caption offset property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if caption offset cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetCaptionPosition ( FSCRT_ANNOT  annot,
FSCRT_BSTR captionPos 
)

Get caption position of a line annotation.

Only line annotation can have caption position property.
Caption position is meaningful only when key "Cap" is true, which can be checked by function FSPDF_Annot_HasCaptionContents. Valid values for caption position are:

  • Inline: means caption will be centered inside the line.
  • Top: means caption will be on top of the line.

Usually, the default value is Inline.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]captionPosPointer to a FSCRT_BSTR structure that receives value of caption position property. Please see details description part for more information.
If there is any error, FSCRT_BSTR::str will be set empty if it is not NULL when call this function, and FSCRT_BSTR::len will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or captionPos is NULL.
FSCRT_ERRCODE_NOTFOUND if no caption position property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if caption position cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetColor ( FSCRT_ANNOT  annot,
FS_BOOL  isFillColor,
FS_ARGB color 
)

Get fill or border color of an annotation.

For border color, this function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX.
For filling color, this function only supports square, circle, polygon, polyline, and free text annotations.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]isFillColorA boolean value used to decide to get the fill color or the border color:
TRUE for fill color, and FALSE for border color.
[out]colorPointer to a FS_ARGB object that receives value of specific type color property. Format: 0xAARRGGBB, and alpha value is ignored.
If there is any error, it will be set 0x00000000.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or color is NULL.
FSCRT_ERRCODE_NOTFOUND if no border or fill color property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if color cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetContents ( FSCRT_ANNOT  annot,
FSCRT_BSTR contents 
)

Get contents of an annotation.

This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]contentsPointer to a FSCRT_BSTR structure (a UTF-8 string) that receives value of contents property.
If there is any error, FSCRT_BSTR::str will be empty if it is not NULL, and FSCRT_BSTR::len will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or contents is NULL.
FSCRT_ERRCODE_NOTFOUND if no content data is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if contents cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetCount ( FSCRT_PAGE  page,
const FSCRT_BSTR filter,
FS_INT32 count 
)

Get count of annotations, by specific filter.

This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX.

Parameters
[in]pageHandle to a FSCRT_PAGE which is a PDF page object.
[in]filterPointer to a filter string.
If it is NULL or filter->str is NULL or filter->len is less than 1, this function will count all annotations. If it is a valid pointer to FSCRT_BSTR, it specifies annotation type:
  • For single type filter: please refer to macro definitions FSPDF_ANNOTTYPE_XXX and it should be one of these macros.
  • For multiple types filter: use comma to separate different types, for example, "Text, Link, Circle".
[out]countPointer to a FS_INT32 object that receives count of annotations. If there is any error, it will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter page, or count is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_INVALIDTYPE if parameter page is not a type of PDF page.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if count cannot be obtained by specified filter because of any other reason.
FSCRT_ERRCODE_UNKNOWNSTATE if annotations in parameter page are not loaded.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • page: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetCreationDateTime ( FSCRT_ANNOT  annot,
FSCRT_DATETIMEZONE dt 
)

Get creation time of a markup annotation.

Only markup annotations can have creation time property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]dtPointer to a FSCRT_DATETIMEZONE structure that receives value of creation time property.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or dt is NULL.
FSCRT_ERRCODE_NOTFOUND if no creation time property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if creation time cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetDefaultAppearance ( FSCRT_ANNOT  annot,
FSPDF_DEFAULTAPPEARANCE defAppearance 
)

Get default appearance of a free text annotation, which can be used in formatting text.

Only free text annotation can have default appearance property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]defAppearancePointer to a FSPDF_DEFAULTAPPEARANCE structure that receives default appearance of a free text annotation.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot or defAppearance is NULL.
FSCRT_ERRCODE_NOTFOUND if no default appearance property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if default appearance cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetDeviceRect ( FSCRT_ANNOT  annot,
FS_BOOL  bTransformIcon,
const FSCRT_MATRIX matrix,
FSCRT_RECT deviceRect 
)

Get rectangle of an annotation in device coordinations.

This is a useful function to get the device rectangle of an annotation, but not support pop-up annotation.
For the rectangle conversion, the result rectangle is always "normalized", which is using device coordinations: left is always smaller than right, and top is always smaller than bottom.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]bTransformIconA boolean value which indicates that whether to transform (like rotate or scale) the icon with page: TRUE means to transform icon's rectangle with page, while FALSE means not transform icon's rectangle with page.
This parameter only affects on "Text" and "FileAttachment" annotations, because they are shown as icon.
[in]matrixA matrix used to transform from PDF page coordinate system to device coordinate system.
[out]deviceRectPointer to a FSCRT_RECT structure that receives rectangle of an annotation in device coordinations. If there is any error, it will be set [0 0 0 0].
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, matrix or deviceRect is NULL.
FSCRT_ERRCODE_NOTFOUND if no rectangle property is found.
FSCRT_ERRCODE_UNSUPPORTED if parameter annot is a pop-up annotation.
FSCRT_ERRCODE_ERROR if rectangle cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetDict ( FSCRT_ANNOT  annot,
FSPDF_OBJECT *  dictionary 
)

Get the dictionary of an annotation.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]dictionaryPointer to a FSPDF_OBJECT handle that receives the annotation dictionary object. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot or dictionary is a NULL.
FSCRT_ERRCODE_ERROR if the dictionary object of annotation cannot be obtained for any other reason.
FSCRT_ERRCODE_UNRECOVERABLE if the function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it for the same objects under multi-threaded environment; otherwise, the application should be synchronized.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
  • dictionary: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetFlags ( FSCRT_ANNOT  annot,
FS_DWORD flags 
)

Get flags of an annotation.

This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]flagsPointer to a FS_DWORD object that receives flags of an annotation. Please refer to macros FSPDF_ANNOTFLAG_XXX and this would be one or a combination of these macros.
If there is any error, it will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or flags is NULL.
FSCRT_ERRCODE_NOTFOUND if no flags property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if flags cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetFormControl ( FSCRT_ANNOT  widgetAnnot,
FSPDF_FORMCONTROL *  formControl 
)

Get a PDF form control from a widget annotation handle.

This function is only valid for widget annotations. A form control could be got only if the function FSPDF_Form_Load is called before.

Parameters
[in]widgetAnnotHandle to a FSPDF_ANNOT object which is a PDF annotation.
[out]formControlPointer to a FSCRT_FORMCONTROL handle that receives a PDF form control. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter widgetAnnot, or formControl is NULL.
FSCRT_ERRCODE_INVALIDTYPE if parameter widgetAnnot is not a widget annotation.
FSCRT_ERRCODE_ERROR if FSPDF_Form_Load is not called before, or other errors occur.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
  • formControl: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetGroupElements ( FSCRT_ANNOT  annot,
FSCRT_ANNOT *  elements,
FS_INT32 count 
)

Get group elements if annotation is in a group, including itself.

This function only supports markup annotations.
This function needs to be called twice to get the group elements:
For the first time, set parameter elements to NULL to get the actual count of group elements. The count value will be set to parameter count as a result returned by first calling.
Then use count to allocate elements.
For the second time, input the allocated elements and its size count to get the group elements. When this function returns successfully, elements will get the group elements and count will get the actual count.
The size of the input array should not be less than the actual count.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]elementsPointer to a FSCRT_ANNOT handle that receives array of group elements. This can be NULL for getting actual count of group elements before allocate this array.
Please see detail description about how to use this function.
[in,out]countPointer to a FS_INT32 object.
When this function is called, it should be the size of array elements if parameter elements is not NULL.
When this function returns, it will receive actual count of group elements which are got.
Please see detail description about how to use this function.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or count is NULL.
FSCRT_ERRCODE_NOTFOUND if input annotation does not belong to any group.
FSCRT_ERRCODE_BUFFEROVERFLOW if parameter elements is valid but count is less than required amount.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if input annotation is not a markup annotation or group elements cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
  • elements: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetGroupHeader ( FSCRT_ANNOT  annot,
FSCRT_ANNOT *  groupHeader 
)

Get header annotation of a group, to which an annotation belongs.

This function only supports markup annotations.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]groupHeaderPointer to a FSCRT_ANNOT handle that receives header annotation. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or groupHeader is NULL.
FSCRT_ERRCODE_NOTFOUND if no header annotation is found.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if input annotation is not a markup annotation or header annotation of group cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
  • groupHeader: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetHighlightingMode ( FSCRT_ANNOT  annot,
FS_INT32 hlMode 
)

Get highlighting mode of a link or widget annotation.

Only link and widget annotations can have highlighting mode property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]hlModePointer to a FS_INT32 object that receives value of highlighting mode property. Please refer to macro definitions FSPDF_ANNOT_HIGHLIGHTINGMODE_XXX and this would be one of these macros.
If there is any error, it will be set -1.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or hlMode is NULL.
FSCRT_ERRCODE_NOTFOUND if no highlighting mode property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if highlighting mode cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetIconFit ( FSCRT_ANNOT  annot,
FSPDF_ANNOTICONFIT iconFit 
)

Get icon fit of a widget annotation.

Only widget annotation(pushbutton field only) can have icon-fit property in MK dictionary.
The icon fit property belongs to MK dictionary. It specifies how to display widget annotation's icon within the annotation rectangle. If present, icon fit property applies to all of annotation's icons (normal, rollover, and alternate).

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]iconFitPointer to a FSPDF_ANNOTICONFIT structure that receives value of icon fit property.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or iconFit is NULL.
FSCRT_ERRCODE_NOTFOUND if there is no valid MK dictionary, or no icon-fit property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if icon fit cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetIconName ( FSCRT_ANNOT  annot,
FSCRT_BSTR iconName 
)

Get icon name of an annotation.

Only text, file attachment, stamp and sound annotation can have icon name property.
Parameter iconName is related to type of parameter annot.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]iconNamePointer to a FSCRT_BSTR structure (a UTF-8 string) that receives value of icon name property. Please refer to macros FSPDF_ANNOT_ICONNAME_XXX and this would be one of these macros.
If there is any error, FSCRT_BSTR::str will be set empty if it is not NULL, and FSCRT_BSTR::len will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or iconName is NULL.
FSCRT_ERRCODE_NOTFOUND if no icon name property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if icon name cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetIndex ( FSCRT_ANNOT  annot,
const FSCRT_BSTR filter,
FS_INT32 index 
)

Get index of a specific annotation, by specific filter.

This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]filterPointer to a filter string.
If it is NULL, this function will get index of specific annotation from all annotations. If it is a valid pointer to FSCRT_BSTR, it specifies annotation type:
  • For single type filter: Please refer to macro definitions FSPDF_ANNOTTYPE_XXX and it should be one of these macros.
  • For multiple types filter: Use comma to separate different types, for example, "Text, Link, Circle".
[out]indexPointer to a FS_INT32 object that receives index of an annotation. If there is any error, it will be set -1.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or index is NULL.
FSCRT_ERRCODE_ERROR if cannot get index because of any other reason.
FSCRT_ERRCODE_NOTFOUND if parameter annot is not found with specific filter.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetInkList ( FSCRT_ANNOT  annot,
FSCRT_PATHDATA *  pathData 
)

Get ink list data of an ink annotation.

Only ink annotation can have ink list property.
InkList is an array of N arrays, each representing a stroked path. Each array is a series of alternating horizontal and vertical coordinates in PDF page space, specifying points along the path.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]pathDataPointer to a FSCRT_PATHDATA handle to receive path data of ink list property.
When this is not used any more, application should release this handle by calling function FSCRT_PathData_Release.
Currently, Foxit PDF SDK thinks the path consists of bezier curve paths:
by default, the type of first point in a bezier curve path would be FSCRT_POINTTYPE_MOVETO, and types of all the rest points in this bezier curve path would be FSCRT_POINTTYPE_BEZIERTO.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or pathData is NULL.
FSCRT_ERRCODE_NOTFOUND if no ink list property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if ink list data cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
  • pathData: this handle is long-term recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetInnerRectMargin ( FSCRT_ANNOT  annot,
FS_FLOAT left,
FS_FLOAT top,
FS_FLOAT right,
FS_FLOAT bottom 
)

Get the margin between inner rectangle and rectangle of an annotation.

Only free text, square, circle, and caret annotation can have inner rectangle margin property. For free text annotation, inner rectangle is where the annotation's text should be displayed.
For square, circle, and caret annotation, inner rectangle means the actual boundaries of underlying square, circle or caret. Usually, the sum of top and bottom margin values should be less than the height of annotation's rectangle, and the sum of left and right margin values should be less than the width of annotation's rectangle.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]leftPointer to a FS_FLOAT object that receives the left margin value. If there is any error, it will be set 0.
[out]topPointer to a FS_FLOAT object that receives the top margin value. If there is any error, it will be set 0.
[out]rightPointer to a FS_FLOAT object that receives the right margin value. If there is any error, it will be set 0.
[out]bottomPointer to a FS_FLOAT object that receives the bottom margin value. If there is any error, it will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, left, top, right, or bottom is NULL.
FSCRT_ERRCODE_NOTFOUND if no inner rectangle margin property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if inner rectangle cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetIntent ( FSCRT_ANNOT  annot,
FSCRT_BSTR intent 
)

Get intent of a markup annotation.

Only markup annotations can have intent property.
For annotations such as FreeText, Line, Polygon, and Polyline, intent name has been predefined.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]intentPointer to a FSCRT_BSTR structure (a UTF-8 string) that receives value of intent property. Please refer to macro definitions FSPDF_ANNOT_INTENTNAME_XXX and this would be one of these macros.
If there is any error, FSCRT_BSTR::str will be set empty if it is not NULL, and FSCRT_BSTR::len will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or intent is NULL.
FSCRT_ERRCODE_NOTFOUND if no intent property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if intent time cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetLeaderLineExtension ( FSCRT_ANNOT  annot,
FS_FLOAT extLength 
)

Get leader line extension of a line annotation.

Only line annotation can have leader line extension property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]extLengthPointer to a FS_FLOAT object that receives value of leader line extension property. If there is any error, it will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or extLength is NULL.
FSCRT_ERRCODE_NOTFOUND if no leader line extension property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if leader line extension cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetLeaderLineLength ( FSCRT_ANNOT  annot,
FS_FLOAT length 
)

Get leader line length of a line annotation.

Only line annotation can have leader line length property. The length of leader lines in PDF page coordination extends from each endpoint of the line perpendicular to the line itself. A positive value means that the leader lines appear in the direction that is clockwise when traversing the line from its starting point to its ending point, while a negative value indicates the opposite direction.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]lengthPointer to a FS_FLOAT object that receives value of leader line length property. If there is any error, it will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or length is NULL.
FSCRT_ERRCODE_NOTFOUND if no leader line length property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if leader line length cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetLeaderLineOffset ( FSCRT_ANNOT  annot,
FS_FLOAT offset 
)

Get leader line offset of a line annotation.

Only line annotation can have leader line offset property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]offsetPointer to a FS_FLOAT object that receives value of leader line offset property. If there is any error, it will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or offset is NULL.
FSCRT_ERRCODE_NOTFOUND if no leader line offset property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if leader line offset cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetLineEndingStyles ( FSCRT_ANNOT  annot,
FSCRT_BSTR startingStyle,
FSCRT_BSTR endingStyle 
)

Get line ending styles of an annotation.

Only free text, line, and polyline annotation can have line ending styles property. Specially, for free text annotation, only when its intent is "FreeTextCallout", it can have line ending styles property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]startingStylePointer to a FSCRT_BSTR structure (a UTF-8 string) that receives value of starting style property.
Please refer to macro definitions FSPDF_ANNOT_LINEENDINGSTYLE_XXX and this would be one of these macros.
If there is any error, FSCRT_BSTR::str will be set empty if it is not NULL, and FSCRT_BSTR::len will be set 0.
[out]endingStylePointer to a FSCRT_BSTR structure (a UTF-8 string) that receives value of ending style property.
Please refer to macro definitions FSPDF_ANNOT_LINEENDINGSTYLE_XXX and this would be one of these macros.
If there is any error, FSCRT_BSTR::str will be set empty if it is not NULL, and FSCRT_BSTR::len will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, startingStyle, or endingStyle is NULL.
FSCRT_ERRCODE_NOTFOUND if no line ending styles property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if line ending styles cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetLinePosition ( FSCRT_ANNOT  annot,
FS_FLOAT x1,
FS_FLOAT y1,
FS_FLOAT x2,
FS_FLOAT y2 
)

Get line position of a line annotation.

Only line annotation can have line position property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]x1Pointer to a FS_FLOAT object that receives starting point in horizontal direction. If there is any error, it will be set 0.
[out]y1Pointer to a FS_FLOAT object that receives starting point in vertical direction. If there is any error, it will be set 0.
[out]x2Pointer to a FS_FLOAT object that receives ending point in horizontal direction. If there is any error, it will be set 0.
[out]y2Pointer to a FS_FLOAT object that receives ending point in vertical direction. If there is any error, it will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, x1, y1, x2, or y2 is NULL.
FSCRT_ERRCODE_NOTFOUND if no line position property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if line position cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetMKCaption ( FSCRT_ANNOT  annot,
FS_INT32  mkEntry,
FSCRT_BSTR caption 
)

Get caption of a specific type in MK dictionary.

Only widget annotation can have caption property in MK dictionary.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]mkEntryAn integer to specify type of caption entry in MK dictionary. It should be one of the following macro definitions:
[out]captionPointer to a FSCRT_BSTR structure (a UTF-8 string) that receives caption in MK dictionary.
If there is any error, FSCRT_BSTR::str will be set empty if it is not NULL, and FSCRT_BSTR::len will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or caption is NULL, or mkEntry is invalid.
FSCRT_ERRCODE_NOTFOUND if no MK dictionary or no MK caption property is found.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if specified caption cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetMKColor ( FSCRT_ANNOT  annot,
FS_INT32  mkEntry,
FS_ARGB color 
)

Get color of specific type in MK dictionary.

Only screen and widget annotations can have color property in MK dictionary.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]mkEntryAn integer to specify the type of color entry in MK dictionary. It should be one of the following macro definitions:
[out]colorPointer to a FS_ARGB object that receives color of specific type. Format: 0xAARRGGBB, and alpha value is ignored. If there is any error, it will be set 0x00000000.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot or color is NULL, or mkEntry is invalid.
FSCRT_ERRCODE_NOTFOUND if no MK dictionary or no MK color property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if specified color cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetMKIconBitmap ( FSCRT_ANNOT  annot,
FS_INT32  mkEntry,
FSCRT_BITMAP *  bitmap 
)

Get icon bitmap of specific icon type in MK dictionary.

Only widget annotation can have icon property in MK dictionary.
Actually, icon of widget annotation is defined by a form XObject. Foxit PDF SDK only supports to get icon bitmap if this form XObject's appearance is an image object.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]mkEntryAn integer to specify the type of icon entry in MK dictionary. It should be one of the following macro definitions:
[out]bitmapPointer to a FSCRT_BITMAP handle to receive a bitmap handle of specific icon if successful.
If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or bitmap is NULL, or mkEntry is invalid.
FSCRT_ERRCODE_NOTFOUND if no MK dictionary or no MK icon property is found.
FSCRT_ERRCODE_UNSUPPORTED if appearance of icon is not an image object.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if icon bitmap cannot be obtained specified because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
  • bitmap: this handle is long-term recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetMKRotation ( FSCRT_ANNOT  annot,
FS_INT32 degree 
)

Get rotation (the number of degrees) in MK dictionary.

Only screen and widget annotation can have rotation property in MK dictionary.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]degreePointer to a FS_INT32 object which that receives rotation entry in MK dictionary. The value will be a multiple of 90.
If there is any error, it will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or degree is NULL.
FSCRT_ERRCODE_NOTFOUND if no MK dictionary or no MK rotation property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if rotation cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetModifiedDateTime ( FSCRT_ANNOT  annot,
FSCRT_DATETIMEZONE dt 
)

Get modification time of an annotation.

This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]dtPointer to a FSCRT_DATETIMEZONE structure that receives value of modification time property.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or dt is NULL.
FSCRT_ERRCODE_NOTFOUND if no modification time property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if modification time cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetName ( FSCRT_ANNOT  annot,
FSCRT_BSTR name 
)

Get name of an annotation.

This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]namePointer to a FSCRT_BSTR structure (a UTF-8 string) that receives value of name property.
If there is any error, FSCRT_BSTR::str will be empty if it is not NULL, and FSCRT_BSTR::len will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or name is NULL.
FSCRT_ERRCODE_NOTFOUND if no name property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if name cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetOpacity ( FSCRT_ANNOT  annot,
FS_FLOAT opacity 
)

Get opacity of a markup annotation.

Only markup annotations can have opacity property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]opacityPointer to a FS_FLOAT object that receives value of opacity property. Valid range is from 0.0 to 1.0. If there is any error, it will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or opacity is NULL.
FSCRT_ERRCODE_NOTFOUND if no opacity property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if opacity cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetOpenStatus ( FSCRT_ANNOT  annot,
FS_BOOL isOpen 
)

Get open status of a text or pop-up annotation.

Only text and pop-up annotation can have open status property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]isOpenPointer to a FS_BOOL object that receives value of open status property. If there is any error, it will be FALSE.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or status is NULL.
FSCRT_ERRCODE_NOTFOUND if no open status property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if open status cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetPopup ( FSCRT_ANNOT  annot,
FSCRT_ANNOT *  popupAnnot 
)

Get a pop-up annotation from a specific markup annotation.

Only markup annotations can have pop-up annotations. But following markup annotations do not need a pop-up annotation: free text annotation, and sound annotation.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]popupAnnotPointer to a FSCRT_ANNOT handle that receives a pop-up annotation. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot or popupAnnot is NULL.
FSCRT_ERRCODE_NOTFOUND if parameter annot does not have a pop-up annotation.
FSCRT_ERRCODE_UNSUPPORTED if parameter annot is not a markup annotation. FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the Pop-up annotation cannot be obtained because of any other reason. For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetQuadPoints ( FSCRT_ANNOT  annot,
FSCRT_QUADPOINTSF quadPoints,
FS_INT32 count 
)

Get quadrilaterals points of an annotation.

Only link, highlight, underline, squiggly-underline and strikeout annotation can have quad-points property.
This function needs to be called twice to get quadrilaterals points:
For the first time, set parameter quadPoints to NULL to get the actual count of quadrilaterals points. The count value will be set to parameter count as a result returned by the first calling.
Then use count to allocate quadPoints.
For the second time, input the allocated quadPoints and its size count to get the quadrilaterals points. When this function returns successfully, quadPoints will get the quadrilaterals points array and count will get the actual count.
The size of the input array should not be less than the actual count.
The order of quadrilaterals points will be as follow:

                (x1, y1)           (x2, y2)
                        ----------------
                        |               |
                        |               |
                        ----------------
                (x3, y3)           (x4, y4)
                
Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]quadPointsPointer to a FSCRT_QUADPOINTSF structure that receives array of quadrilaterals points of an annotation. This can be NULL for getting actual count of quadrilaterals points before allocate this array.
Please see detail description about how to use this function.
[in,out]countPointer to a FS_INT32 object.
When this function is called, it should be the size of array quadPoints if parameter quadPoints is not NULL.
When this function returns, it will receive actual count of quadrilaterals points which are got.
Please see detail description about how to use this function.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or count is NULL.
FSCRT_ERRCODE_NOTFOUND if no quad-points property is found.
FSCRT_ERRCODE_BUFFEROVERFLOW if parameter quadPoints is valid but count is less than required amount.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if quadrilaterals points cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetRect ( FSCRT_ANNOT  annot,
FSCRT_RECTF rect 
)

Get rectangle of an annotation.

This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]rectPointer to a FSCRT_RECTF structure that receives rectangle of an annotation. If there is any error, it will be set [0 0 0 0].
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or rect is NULL.
FSCRT_ERRCODE_NOTFOUND if no rectangle property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if rectangle cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetReply ( FSCRT_ANNOT  annot,
FS_INT32  index,
FSCRT_ANNOT *  replyAnnot 
)

Get reply with specifies index of a markup annotation.

This function only supports markup annotations.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]indexThe index of reply annotations. Range: 0 to (replycount-1). replycount is returned by function FSPDF_Annot_CountReplies.
[out]replyAnnotPointer to a FSCRT_ANNOT handle that receives reply annotation. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot or replyAnnot is NULL.
FSCRT_ERRCODE_NOTFOUND if parameter index is out of range.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if cannot insert a reply because of any other reason.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
  • replyAnnot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetState ( FSCRT_ANNOT  stateAnnot,
FS_INT32 stateModel,
FS_INT32 state 
)

Get state model and state out of a state text annotation.

This function only supports markup annotations.The markup annotations may have an author-specific state associated with them. The state is not specified in the annotation itself but in a separate text annotation that refers to the original annotation by means of its IRT entry. This function provided to get the state and stateModel of a state text annotation. For more details, please refer to PDF Reference 1.7 P620 "Annotation States".

Parameters
[in]stateAnnotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]stateModelPointer to FS_INT32 object that receives state model. Please refer to macro definitions FSPDF_ANNOTSTATEMODEL_XXX and this would be one of these macros.
If there is any error, it will be set -1.
[out]statePointer to FS_INT32 object that receives state. Please refer to macro definitions FSPDF_ANNOTSTATE_XXX and this would be one of these macros.
If there is any error, it will be set -1.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter stateAnnot, stateModel, or state is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if state model or state cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • stateAnnot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetStateAnnot ( FSCRT_ANNOT  annot,
FS_INT32  stateModel,
FS_INT32  index,
FSCRT_ANNOT *  stateAnnot 
)

Get specified state annotation associated with a markup annotation.

This function only supports markup annotations.The markup annotations may have an author-specific state associated with them. The state is not specified in the annotation itself but in a separate text annotation that refers to the original annotation by means of its IRT entry. This function provided to get the specific state text annotation with the specific state model. For more details, please refer to PDF Reference 1.7 P620 "Annotation States".

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]stateModelAn integer value that specifies state model. Please refer to macro definitions FSPDF_ANNOTSTATEMODEL_XXX and this should be one of these macros.
[in]indexThe index of state annotations to be got. Range: 0 to (stateCount-1). stateCount is returned by by function FSPDF_Annot_CountStateAnnots with the same parameter stateModel.
[out]stateAnnotPointer to a FSCRT_ANNOT handle that receives a specific state annotation. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot or stateAnnot is NULL, or stateModel is invalid.
FSCRT_ERRCODE_NOTFOUND if parameter index is out of range.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if specified state annotation cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
  • stateAnnot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetSubject ( FSCRT_ANNOT  annot,
FSCRT_BSTR subject 
)

Get subject of a markup annotation.

Only markup annotations can have subject property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]subjectPointer to a FSCRT_BSTR structure (a UTF-8 string) that receives value of subject property.
If there is any error, FSCRT_BSTR::str will be set empty if it is not NULL, and FSCRT_BSTR::len will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or subject is NULL.
FSCRT_ERRCODE_NOTFOUND if no subject property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if subject cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetSymbol ( FSCRT_ANNOT  annot,
FSCRT_BSTR symbol 
)

Get symbol of a caret annotation.

Only caret annotation can have symbol property.
A symbol is associated with caret. Valid values are:

  • P: A new paragraph symbol should be associated with the caret.
  • None: No symbol should be associated with the caret.

Usually, default value is None.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]symbolPointer to a FSCRT_BSTR structure that receives value of symbol property.
If there is any error, FSCRT_BSTR::str will be set empty if it is not NULL when call this function, and FSCRT_BSTR::len will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or symbol is NULL.
FSCRT_ERRCODE_NOTFOUND if no symbol property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if symbol cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetTitle ( FSCRT_ANNOT  annot,
FSCRT_BSTR title 
)

Get title of a markup annotation.

Only markup annotations can have title property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]titlePointer to a FSCRT_BSTR structure (a UTF-8 string) that receives value of title property.
If there is any error, FSCRT_BSTR::str will be set empty if it is not NULL, and FSCRT_BSTR::len will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or title is NULL.
FSCRT_ERRCODE_NOTFOUND if no title property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if title cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetType ( FSCRT_ANNOT  annot,
FSCRT_BSTR annotType 
)

Get type of an annotation.

This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]annotTypePointer to a UTF-8 string that receives type of an annotation. Please refer to macro definitions FSPDF_ANNOTTYPE_XXX and this would be one of these macros.
If there is any error, FSCRT_BSTR::str will be set empty if it is not NULL when call this function, and FSCRT_BSTR::len will be set 0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot or annotType is NULL.
FSCRT_ERRCODE_NOTFOUND if no type property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if type cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_GetVertices ( FSCRT_ANNOT  annot,
FS_FLOAT vertices,
FS_INT32 count 
)

Get vertices of a polygon or polyline annotation.

Only polygon, and polyline annotation can have vertices property.
This function needs to be called twice to get vertices:
For the first time, set parameter vertices to NULL to get the actual count of vertices. The count value will be set to parameter count as a result returned by the first calling.
Then use count to allocate vertices.
For the second time, input the allocated vertices and its size count to get the vertices. When this function returns successfully, vertices will get the vertices array and count will get the actual count.
The size of the input array should not be less than the actual count.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]verticesPointer to a FS_FLOAT object that receives vertices array of an annotation. In this array, 2 numbers is a pair, representing a point in PDF page coordinate system. This can be NULL for getting actual count of quadrilaterals points before allocate this array.
Please see detail description about how to use this function.
[in,out]countPointer to a FS_INT32 object. Usually, it should be a multiple of 2.
When this function is called, it should be the size of array vertices if parameter vertices is not NULL.
When this function returns, it will receive actual count of vertices array which are got.
Please see detail description about how to use this function.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot or count is NULL.
FSCRT_ERRCODE_NOTFOUND if no vertices property is found.
FSCRT_ERRCODE_BUFFEROVERFLOW if parameter vertices is valid but count is less than required amount.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if vertices cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_HasCaptionContents ( FSCRT_ANNOT  annot,
FS_BOOL hasCap 
)

Check if there is a caption to a line annotation.

Only line annotation can have caption contents property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]hasCapPointer to a FS_BOOL object that receives a boolean value that specifies whether there is a caption to annotation or not.
If there is any error, it will be FALSE.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or isCap is NULL.
FSCRT_ERRCODE_NOTFOUND if no caption contents property is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if caption contents cannot be checked because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_HasMKEntry ( FSCRT_ANNOT  annot,
FS_INT32  mkEntry,
FS_BOOL hasEntry 
)

Check if specific entry is in MK dictionary.

Only screen and widget annotation can have MK dictionary.
MK entry can be used to provide an appearance characteristics dictionary containing additional information for constructing the annotation's appearance stream.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]mkEntryAn integer value used to specify entry in MK dictionary. Please refer to macro definitions FSPDF_ANNOT_MKENTRY_XXX and this should be one of these macros.
[out]hasEntryPointer to a FS_BOOL object that receives a boolean value which specifies whether specific entry is in MK dictionary or not.
If there is any error, it will be FALSE.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or hasEntry is NULL, or mkEntry is invalid.
FSCRT_ERRCODE_NOTFOUND if no MK dictionary is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if specified entry cannot be checked because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_InsertAction ( FSCRT_ANNOT  annot,
FS_INT32  trigger,
FS_INT32  index,
const FSPDF_ACTIONDATA actionData 
)

Insert an action of specified index associated with an annotation.

Only link , screen and widget annotations can have action.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]triggerTrigger of action. Please refer to macro definition FSPDF_TRIGGER_ANNOT_XXX and this should be one of these macros.
[in]indexIndex of actions. Range: 0 to (actioncount-1). actioncount is returned by function FSPDF_Annot_CountActions.
If it is out of the range, parameter actionData will be inserted to the last.
[in]actionDataPointer to a FSPDF_ACTIONDATA structure which specifies the action data.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or actionData is NULL, or trigger is invalid.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_ERROR if the action cannot be inserted because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
For widget annotation, user is strongly suggested to use functions in PDF Form module for widget related to form object.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_InsertReply ( FSCRT_ANNOT  annot,
FS_INT32  index,
FSCRT_ANNOT *  replyAnnot 
)

Insert a new empty reply with a specified index to a markup annotation.

This function only supports markup annotations. Currently, this function only support to insert reply to the last. Parameter index is reserved and should be -1.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]index(Reserved and no effect currently. It should be -1 and new reply will be inserted to the last.)
Index of the reply annotations. Range: 0 to (replycount-1). replycount is returned by function FSPDF_Annot_CountReplies.
If it is out of the range, the new reply will be inserted to the last.
[out]replyAnnotPointer to a FSCRT_ANNOT handle that receives the new reply annotation.
Application can call other annotation related functions to set this new reply annotation.
If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot or replyAnnot is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if a reply cannot be inserted because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
  • replyAnnot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_IsGrouped ( FSCRT_ANNOT  annot,
FS_BOOL isGrouped 
)

Check whether an annotation is in a group.

This function only supports markup annotations.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[out]isGroupedPointer to a FS_BOOL object that receives the result. If there is any error, it will be FALSE.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or isGrouped is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if input annotation is not a markup annotation or the check cannot be done because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_Move ( FSCRT_ANNOT  annot,
const FSCRT_RECTF newRect 
)

Move an annotation to a new position specified by a rectangle.

To move an annotation is to reset its rectangle. This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]newRectPointer to a FSCRT_RECTF structure that specifies the new position.
The rect should be "normalized" for PDF page coordination: left is always smaller than right, and bottom is always smaller than top.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot or newRect is NULL, or newRect is invalid.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if annotation cannot be moved because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
For widget annotation, user is strongly suggested to use functions in PDF Form module for widget related to form object.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_Remove ( FSCRT_ANNOT  annot)

Remove an annotation from page.

This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX, except FSPDF_ANNOTTYPE_WATERMARK.
For widget annotation, this function can remove it but user is still strongly suggested not to do so. User is strongly suggested to use functions in PDF Form module for widget related to form object.
For watermark annotation, user is suggested to use functions in PDF Watermark module for most operations of watermark.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL, or annot is a watermark annotation.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if annotation cannot be removed because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_RemoveAction ( FSCRT_ANNOT  annot,
FS_INT32  trigger,
FS_INT32  index 
)

Remove an action of specified index associated with an annotation.

Only link , screen and widget annotations can have action.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]triggerTrigger of action. Please refer to macro definition FSPDF_TRIGGER_ANNOT_XXX and this should be one of these macros.
[in]indexIndex of actions. Range: 0 to (actioncount-1). actioncount is returned by function FSPDF_Annot_CountActions.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL, or trigger is invalid.
FSCRT_ERRCODE_NOTFOUND if parameter index is out of range or no action is found.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the action cannot be removed because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
For widget annotation, user is strongly suggested to use functions in PDF Form module for widget related to form object.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_RemoveAllActions ( FSCRT_ANNOT  annot,
FS_INT32  trigger 
)

Remove all the actions associated with an annotation.

Only link , screen and widget annotations can have action.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]triggerTrigger of action. Please refer to macro definition FSPDF_TRIGGER_ANNOT_XXX and this should be one of these macros.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL, or trigger is invalid.
FSCRT_ERRCODE_NOTFOUND if no trigger action is found.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if all actions cannot be removed because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
For widget annotation, user is strongly suggested to use functions in PDF Form module for widget related to form object.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_RemoveAllReplies ( FSCRT_ANNOT  annot)

Remove all the replies of a markup annotation.

This function only supports markup annotations.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if all replies cannot be removed because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_RemoveAllStates ( FSCRT_ANNOT  annot)

Remove all the state annotations associated with an annotation.

This function only supports markup annotations.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if all the state annotations cannot be removed because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_RemoveMKEntry ( FSCRT_ANNOT  annot,
FS_INT32  mkEntry 
)

Remove a specified entry in MK dictionary.

Only screen and widget annotations can have MK dictionary.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]mkEntryAn integer value used to specify an entry in MK dictionary. Please refer to macro definitions FSPDF_ANNOT_MKENTRY_XXX and this should be one of these macros.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL, or mkEntry is invalid.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_NOTFOUND if no MK dictionary is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if specified entry cannot be removed because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
For widget annotation, user is strongly suggested to use functions in PDF Form module for widget related to form object.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_RemoveReply ( FSCRT_ANNOT  annot,
FS_INT32  index 
)

Remove a reply with specified index to a markup annotation.

This function only supports markup annotations.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]indexIndex of the reply annotations to be removed. Range: 0 to (replycount-1). replycount is returned by function FSPDF_Annot_CountReplies.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_NOTFOUND if parameter index is out of range.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if the reply cannot be removed because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_ResetAppearance ( FSCRT_ANNOT  annot)

Reset(regenerate) appearance of an annotation.

This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX, except PSInk, 3D, PrinterMark, TrapNet, sound, movie, screen, watermark, and signature(a subtype of widget annot).
For watermark annotation, user is suggested to use functions in PDF Watermark module for most operations of watermark.
Foxit PDF SDK assume that a widget annot should be a form field's control. So, for widget annotation, application should load form module by function FSPDF_Form_Load first. If not, this function will return FSCRT_ERRCODE_UNKNOWNSTATE. For a signature field, we suggest that use function FSPDF_Signature_ResetAppearance to handle it.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_UNSUPPORTED if type of input annotation is not currently supported.
FSCRT_ERRCODE_UNKNOWNSTATE if some necessary property of parameter annot does not be set correctly, or form module has not been loaded for widget annot. For annotation's property, please refer to comment of property related functions.
FSCRT_ERRCODE_ERROR if the appearance cannot be reset because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
For Ink annotation, this function should not be called to reset appearance if all the path points of the ink annotation has been removed.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetAction ( FSCRT_ANNOT  annot,
FS_INT32  trigger,
FS_INT32  index,
const FSPDF_ACTIONDATA actionData 
)

Set action data of specified index associated with an annotation.

Only link , screen and widget annotations can have action.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]triggerThe trigger of action. Please refer to macro definition FSPDF_TRIGGER_ANNOT_XXX and this should be one of these macros.
[in]indexIndex of actions. Range: 0 to (actioncount-1). actioncount is returned by function FSPDF_Annot_CountActions.
[in]actionDataPointer to a FSPDF_ACTIONDATA structure which specifies the action data.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or actionData is NULL, or trigger is invalid.
FSCRT_ERRCODE_NOTFOUND if parameter index is out of range or no action is found.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if action data cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
For widget annotation, user is strongly suggested to use functions in PDF Form module for widget related to form object.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetAlignment ( FSCRT_ANNOT  annot,
FS_INT32  alignment 
)

Set alignment of a free text annotation.

Only free text annotation can have alignment property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]alignmentAlignment value to be set to the annotation. It should be one of the following macro definitions:
  • 0: Left-justified
  • 1: Centered
  • 2: Right-justified
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL, or alignment is invalid.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the alignment cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
For widget annotation, user is strongly suggested to use functions in PDF Form module for widget related to form object.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetAttachment ( FSCRT_ANNOT  annot,
FSPDF_ATTACHMENT  attachment 
)

Set attachment of a file attachment annotation.

Only file attachment annotation can have attachment property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]attachmentPointer to a FSPDF_ATTACHMENT handle to be set to a file attachment annotation.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or attachment is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if attachment cannot be set because of any other reasons.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
  • attachment: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetBorder ( FSCRT_ANNOT  annot,
const FSPDF_ANNOTBORDER border 
)

Set border of an annotation.

This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX.
The dash pattern array's elements of FSPDF_ANNOTBORDER structure must be nonnegative and not all zeros.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]borderPointer to a FSPDF_ANNOTBORDER structure to specify border information.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot or border is NULL, or FSPDF_ANNOTBORDER::borderStyle is invalid.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the border cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
For widget annotation, user is strongly suggested to use functions in PDF Form module for widget related to form object.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetCalloutLinePoints ( FSCRT_ANNOT  annot,
FS_FLOAT  x1,
FS_FLOAT  y1,
FS_FLOAT  x2,
FS_FLOAT  y2,
FS_FLOAT  x3,
FS_FLOAT  y3 
)

Set callout line points of a free text annotation.

Only free text annotation can have callout line points property. When intent of freetext is set as FSPDF_ANNOT_INTENTNAME_FREETEXT_CALLOUT, this property would be necessary.
Callout line points property can have 4 or 6 numbers:

  • 6 numbers represent the starting, knee point, and ending coordinates of a line annotation in PDF page space.
  • 4 numbers represent the starting and ending coordinates of a line annotation. In this case, parameter x3 and y3 should set the same value as x2 and y2.
Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]x1A float value to specify the new first x position.
[in]y1A float value to specify the new first y position.
[in]x2A float value to specify the new second x position.
[in]y2A float value to specify the new second y position.
[in]x3A float value to specify the new third x position.
[in]y3A float value to specify the new third y position.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the callout line points cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetCaptionContents ( FSCRT_ANNOT  annot,
FS_BOOL  hasCap 
)

Set flag which decides whether to set a caption to the annotation or not.

Only line annotation can have caption contents property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]hasCapA boolean value that specifies whether to set a caption the annotation or not.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if caption contents cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetCaptionOffset ( FSCRT_ANNOT  annot,
FS_FLOAT  offsetx,
FS_FLOAT  offsety 
)

Set caption offset of a line annotation.

Only line annotation can have caption offset property.
Caption offset is the offset of caption from its normal position. It is meaningful only when key "Cap" is true, which can be checked by function FSPDF_Annot_HasCaptionContents.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]offsetxA float value that specifies the new horizontal offset along the annotation line from its midpoint.
A positive value indicates offset to the right and a negative value indicates offset to the left.
[in]offsetyA float value that specifies the new vertical offset perpendicular to the annotation line.
A positive value indicates a shift up and a negative value indicates a shift down.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if caption offset cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetCaptionPosition ( FSCRT_ANNOT  annot,
const FSCRT_BSTR captionPos 
)

Set caption position of a line annotation.

Only line annotation can have caption position property.
Caption position has a meaning only when key "Cap" is true, which can be checked by function FSPDF_Annot_HasCaptionContents. Valid values for caption position are:

  • Inline: means the caption will be centered inside the line.
  • Top: means the caption will be on top of the line.

Usually, the default value is Inline.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]captionPosPointer to a FSCRT_BSTR structure to specify value of caption position property. Please see "details" description part for more information.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL,
or parameter captionPos or FSCRT_BSTR::str is NULL or the FSCRT_BSTR::len is zero.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if caption position cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetColor ( FSCRT_ANNOT  annot,
FS_BOOL  isFillColor,
FS_ARGB  color 
)

Set filling or bordering color of an annotation.

  • For border color, this function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX.
    ATTENTION: Specially for FreeText annotation, if user wants to get the correct value which is just set by current function, please ensure function FSPDF_Annot_ResetAppearance has been called successfully after setting border color of a free text annotation.
  • For fill color, this function only supports square, circle, polygon, polyline, and free text annotations.
Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]isFillColorA boolean value used to decide to set the fill color or the border color:
TRUE for fill color, and FALSE for border color.
[in]colorPointer to a FS_ARGB object that sets value of specific type color property. Format: 0xAARRGGBB, and alpha value is ignored.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the color cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
For widget annotation, user is strongly suggested to use functions in PDF Form module for widget related to form object.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetContents ( FSCRT_ANNOT  annot,
const FSCRT_BSTR contents 
)

Set contents of an annotation.

This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX.
Specially, for free text annotation, please ensure that it has already got a default appearance. If not, please use function FSPDF_Annot_SetDefaultAppearance to set it.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]contentsPointer to a FSCRT_BSTR structure that specifies value of contents property. It can be NULL or empty. When it is valid, it should be a valid UTF-8 string.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL.
FSCRT_ERRCODE_FORMAT if parameter contents is not in UTF-8 format if it is valid.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the contents cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
For widget annotation, user is strongly suggested to use functions in PDF Form module for widget related to form object.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetCreationDateTime ( FSCRT_ANNOT  annot,
const FSCRT_DATETIMEZONE dt 
)

Set creation time of a markup annotation.

Only markup annotations can have creation time property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]dtPointer to a FSCRT_DATETIMEZONE structure that specifies value of creation time property.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot or dt is NULL, or parameter dt is invalid.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation time is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the creation time cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetDefaultAppearance ( FSCRT_ANNOT  annot,
const FSPDF_DEFAULTAPPEARANCE defAppearance 
)

Set default appearance of a free text annotation, which can be used in formatting the text.

Only free text annotation can have default appearance property. And this property is necessary for free text annotation.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]defAppearancePointer to a FSPDF_DEFAULTAPPEARANCE structure to specify default appearance.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or defAppearance is NULL, or some members of defAppearance are invalid.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if default appearance cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetFlags ( FSCRT_ANNOT  annot,
FS_DWORD  flags 
)

Set flags of an annotation.

This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]flagsThe flags to be set to the annotation. Please refer to macros FSPDF_ANNOTFLAG_XXX and this can be one or a combination of these macros.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL or parameter flags is invalid.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if flags cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
For widget annotation, user is strongly suggested to use functions in PDF Form module for widget related to form object.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetGroup ( FSCRT_ANNOT *  annots,
FS_INT32  count,
FS_INT32  headerIndex 
)

Group all the input annotations.

This function only supports markup annotations. All the annotations in the input array should be markup annotation and should all be in the same PDF page.

Parameters
[in]annotsPointer to a FSCRT_ANNOT handle which is an annotation array. This array should contain at least 2 elements.
[in]countSize of the annotation array.
[in]headerIndexIndex of an annotation in the annotation array. Annotation with this index will become the group header. Range: 0 to (count-1).
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annots is NULL, or count, headerIndex is invalid.
FSCRT_ERRCODE_CONFLICT if annotations in parameter annots are not all in the same PDF page.
FSCRT_ERRCODE_INVALIDTYPE if there is any non-markup annotation in the array represented by parameter annots.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_ERROR if all the annotations cannot be grouped because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annots: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetHighlightingMode ( FSCRT_ANNOT  annot,
FS_INT32  hlMode 
)

Set highlighting mode of a link or widget annotation.

Only link and widget annotations can have the highlighting mode property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]hlModeHighlighting mode to be set to the annotation. It should be one of the following macro definitions:
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL, or hlMode is invalid.
FSCRT_ERRCODE_UNSUPPORTED if annot is link annotation and hlMode is FSPDF_ANNOT_HIGHLIGHTINGMODE_TOGGLE. FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the highlighting mode cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
For widget annotation, user is strongly suggested to use functions in PDF Form module for widget related to form object.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetIconFit ( FSCRT_ANNOT  annot,
const FSPDF_ANNOTICONFIT iconFit 
)

Set icon fit of a widget annotation.

Only widget annotation(pushbutton field only) can have icon-fit property in MK dictionary.
The icon fit property belongs to MK dictionary. It specifies how to display the widget annotation's icon within the annotation rectangle. If present, the icon fit property applies to all of the annotation's icons (normal, rollover, and alternate).

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]iconFitPointer to a FSPDF_ANNOTICONFIT structure to specify icon fit.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or iconFit is NULL, or some members of iconFit are invalid.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if icon fit cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
For widget annotation, user is strongly suggested to use functions in PDF Form module for widget related to form object.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetIconName ( FSCRT_ANNOT  annot,
const FSCRT_BSTR iconName 
)

Set icon name of an annotation.

Only text, file attachment, stamp and sound annotations can have icon name property.
Currently, Foxit PDF SDK does not support to set icon name of sound annotations.
Parameter iconName is related to the type of parameter annot. ATTENTION: for stamp annotation, Foxit PDF SDK does not define default icon appearance currently. So if application set icon name of stamp annotation, application should ensure to implement FSPDF_ICONPROVIDER for stamp annotation.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]iconNamePointer to a FSCRT_BSTR structure to specify value of icon name property. Please refer to macros FSPDF_ANNOT_ICONNAME_XXX and this should be one of these macros.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL, or parameter iconName or FSCRT_BSTR::str is NULL or the FSCRT_BSTR::len is zero.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNSUPPORTED if type of input annotation is not supported currently .
FSCRT_ERRCODE_ERROR if the icon name cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetIconProvider ( FSPDF_ICONPROVIDER iconProvider)

Set icon provider to SDK management.

For annotation type "Text", "FileAttachment", "Sound"(not support now) and "Stamp", they appear on the page in some distinctive icons.
For annotation with type "Text" and "FileAttachment", Foxit PDF SDK has defined their default icon appearance. For stamp annotation, Foxit PDF SDK does not define default icon appearance currently. If you want to use private application icon appearance, this function should be called to set an icon provider.

Parameters
[in]iconProviderPointer to a FSPDF_ICONPROVIDER structure.
Returns
FSCRT_ERRCODE_SUCCESS means success.
FSCRT_ERRCODE_PARAM if parameter iconProvider is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_INVALIDMODULE if PDF module is not initialized.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if fail to set icon provider because of any other reason.
For more definitions please see macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetInkList ( FSCRT_ANNOT  annot,
FSCRT_PATHDATA  pathData 
)

Set ink list data of an ink annotation.

Only ink annotation can have ink list property. And this property is necessary for ink annotation.
InkList is an array of N arrays, each representing a stroked path. Each array is a series of alternating horizontal and vertical coordinates in PDF page space, specifying points along the path.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]pathDataHandle to a FSCRT_PATHDATA object to specify the new path data of ink list property. In Foxit PDF SDK, the new path should consists of only lines or only bezier curves. That means:
the type of first point in the new path will be treated as FSCRT_POINTTYPE_MOVETO. And for the rest points:
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or pathData is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if ink list data cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
  • pathData: this handle is long-term recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetInnerRectMargin ( FSCRT_ANNOT  annot,
FS_FLOAT  left,
FS_FLOAT  top,
FS_FLOAT  right,
FS_FLOAT  bottom 
)

Set the margin between inner rectangle and rectangle of an annotation.

Only free text, square, circle, and caret annotations can have inner rectangle margin property.
For free text annotation, inner rectangle is where the annotation's text should be displayed.
For square, circle, and caret annotation, inner rectangle means the actual boundaries of underlying square, circle or caret. Especially for caret annotation, this property is necessary and should be set for display.
When setting inner rectangle margin, application should ensure that: the sum of top and bottom margin values should be less than the height of annotation's rectangle, and the sum of left and right margin values should be less than the width of annotation's rectangle.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]leftA float value to specify the new left margin value. It should not be negative.
[in]topA float value to specify the new top margin value. It should not be negative.
[in]rightA float value to specify the new right margin value. It should not be negative.
[in]bottomA float value to specify the new bottom margin value. It should not be negative.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL or parameter left, top, right, or bottom is invalid.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the inner rectangle cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
Currently, application should ensure this property has been set valid to newly added caret annotation.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetIntent ( FSCRT_ANNOT  annot,
const FSCRT_BSTR intent 
)

Set intent of a markup annotation.

Only markup annotations can have intent property.
For annotations such as FreeText, Line, Polygon, and Polyline, the intent name has been predefined.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]intentPointer to a FSCRT_BSTR structure that specifies value of intent property. Please refer to macro definitions FSPDF_ANNOT_INTENTNAME_XXX and this can be one of these macros (with same annotation type) for free text, line, polygon, and polyline annotations. Currently,
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL, or intent is invalid.
or parameter intent or FSCRT_BSTR::str is NULL or the FSCRT_BSTR::len is zero.
FSCRT_ERRCODE_UNSUPPORTED if parameter intent represents an unsupported predefined intent name.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the intent cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetLeaderLineExtension ( FSCRT_ANNOT  annot,
FS_FLOAT  extLength 
)

Set leader line extension of a line annotation.

Only line annotation can have leader line extension property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]extLengthA float value to specify new value of leader line extension property. It should be non-negative.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL, or extLength is negative.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the leader line extension cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetLeaderLineLength ( FSCRT_ANNOT  annot,
FS_FLOAT  length 
)

Set leader line length of a line annotation.

Only line annotation can have leader line length property. The length of leader lines in PDF page coordination extends from each endpoint of the line perpendicular to the line itself. A positive value means that the leader lines appear in the direction that is clockwise when traversing the line from its starting point to its ending point, while a negative value indicates the opposite direction.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]lengthA float value to specify new value of leader line length property.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the leader line length cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetLeaderLineOffset ( FSCRT_ANNOT  annot,
FS_FLOAT  offset 
)

Set leader line offset of a line annotation.

Only line annotation can have leader line offset property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]offsetA float value to specify new value of leader line offset property. It should be non-negative.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL, or offset is negative.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the leader line offset cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetLineEndingStyles ( FSCRT_ANNOT  annot,
const FSCRT_BSTR startingStyle,
const FSCRT_BSTR endingStyle 
)

Set line ending styles of an annotation.

Only free text, line, and polyline annotations can have line ending styles property. Specially, for free text annotation, only when its intent is "FreeTextCallout", it can have line ending styles property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]startingStylePointer to a FSCRT_BSTR structure that specifies value of starting property. Please refer to macro definitions FSPDF_ANNOT_LINEENDINGSTYLE_XXX and this should be one of these macros.
[in]endingStylePointer to a FSCRT_BSTR structure that specifies value of ending style property. Please refer to macro definitions FSPDF_ANNOT_LINEENDINGSTYLE_XXX and this should be one of these macros.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL, or parameter startingStyle, or endingStyleor FSCRT_BSTR::str is NULL, or the FSCRT_BSTR::len is zero.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the line ending styles cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetLinePosition ( FSCRT_ANNOT  annot,
FS_FLOAT  x1,
FS_FLOAT  y1,
FS_FLOAT  x2,
FS_FLOAT  y2 
)

Set line position of a line annotation.

Only line annotation can have line position property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]x1A float value to specify the new starting point in horizontal direction.
[in]y1A float value to specify the new starting point in vertical direction.
[in]x2A float value to specify the new ending point in horizontal direction.
[in]y2A float value to specify the new ending point in vertical direction.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the line position cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetMKCaption ( FSCRT_ANNOT  annot,
FS_INT32  mkEntry,
const FSCRT_BSTR caption 
)

Set caption of a specific type in MK dictionary.

Only widget annotation can have caption property in MK dictionary.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]mkEntryAn integer to specify the type of caption entry in MK dictionary. It should be one of the following macro definitions:
[in]captionPointer to a FSCRT_BSTR structure to specify the new caption. It can be NULL or empty. When it is valid, it should be a valid UTF-8 string.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or caption is NULL, or mkEntry is invalid.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_FORMAT if parameter caption is not in UTF-8 format if it is valid.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if specified caption cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
For widget annotation, user is strongly suggested to use functions in PDF Form module for widget related to form object.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetMKColor ( FSCRT_ANNOT  annot,
FS_INT32  mkEntry,
FS_ARGB  color 
)

Set color of specific type in MK dictionary.

Only screen and widget annotations can have color property in MK dictionary.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]mkEntryAn integer to specify the type of color entry in MK dictionary. It should be one of the following macro definitions:
[in]colorPointer to a FS_ARGB object that receives color of specific type. Format: 0xAARRGGBB, and alpha value is ignored.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL, or mkEntry is invalid.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if specified color cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
For widget annotation, user is strongly suggested to use functions in PDF Form module for widget related to form object.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetMKIconBitmap ( FSCRT_ANNOT  annot,
FS_INT32  mkEntry,
FSCRT_BITMAP  bitmap 
)

Set a bitmap to a specific icon entry in MK dictionary.

Only widget annotation can have icon property in MK dictionary.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]mkEntryAn integer to specify the type of icon entry in MK dictionary. It should be one of the following macro definitions:
[in]bitmapPointer to a FSCRT_BITMAP handle which specifies the new icon bitmap.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or bitmap is NULL, or mkEntry is invalid.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if specified icon bitmap cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
For widget annotation, user is strongly suggested to use functions in PDF Form module for widget related to form object.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
  • bitmap: this handle is long-term recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetMKIconImage ( FSCRT_ANNOT  annot,
FS_INT32  mkEntry,
FSCRT_IMAGE  image 
)

Set an image to a specific icon entry in MK dictionary.

Only widget annotation can have icon property in MK dictionary.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]mkEntryAn integer to specify the type of icon entry in MK dictionary. It should be one of the following macro definitions:
[in]imagePointer to a FSCRT_IMAGE handle which specifies the new icon image. This image handle can be created by function FSCRT_Image_LoadFromFile. And before use it, applicaion should also call function FSCRT_Image_LoadFrame to make sure which frame of the image will be used to set MK icon.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or image is NULL, or mkEntry is invalid.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if specified icon image cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
For widget annotation, user is strongly suggested to use functions in PDF Form module for widget related to form object.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
  • image: this handle is long-term recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetMKRotation ( FSCRT_ANNOT  annot,
FS_INT32  degree 
)

Set rotation in MK dictionary.

Only screen and widget annotations can have rotation property in MK dictionary.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]degreeAn integer that specifies the new value of rotation entry. The value must be a multiple of 90.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL, or degree is invalid.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if rotation cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
For widget annotation, user is strongly suggested to use functions in PDF Form module for widget related to form object.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetModifiedDateTime ( FSCRT_ANNOT  annot,
const FSCRT_DATETIMEZONE dt 
)

Set modification time of an annotation.

This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]dtPointer to a FSCRT_DATETIMEZONE structure that specifies value of modification time property.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot or dt is NULL, or parameter dt is invalid.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the modified time cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
For widget annotation, user is strongly suggested to use functions in PDF Form module for widget related to form object.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetName ( FSCRT_ANNOT  annot,
const FSCRT_BSTR name 
)

Set name of an annotation.

This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]namePointer to a FSCRT_BSTR structure that specifies value of name property. It can be NULL or empty. When it is valid, it should be a valid UTF-8 string.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL.
FSCRT_ERRCODE_FORMAT if parameter name is not in UTF-8 format if it is valid.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if the name cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
For widget annotation, user is strongly suggested to use functions in PDF Form module for widget related to form object.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetOpacity ( FSCRT_ANNOT  annot,
FS_FLOAT  opacity 
)

Set opacity of an annotation.

Only markup annotations can have opacity property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]opacityOpacity value to be set to the annotation. Valid range is from 0.0 to 1.0.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL, or opacity is invalid.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the opacity cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
For widget annotation, user is strongly suggested to use functions in PDF Form module for widget related to form object.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetOpenStatus ( FSCRT_ANNOT  annot,
FS_BOOL  status 
)

Set open status of a text or pop-up annotation.

Only text and pop-up annotations can have the open status property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]statusA boolean value used to specify the open status to be set to the annotation.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the open status cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetPopup ( FSCRT_ANNOT  annot,
FSCRT_ANNOT  popupAnnot 
)

Set a pop-up annotation to a specific markup annotation.

Only markup annotations can have pop-up annotations. But following markup annotations do not need a pop-up annotation: free text annotation, sound annotation.
If input annot is a markup annotation but already has a related pop-up annotation, this function will not succeed and return FSCRT_ERRCODE_CONFLICT. Index of annotations in the same page may be changed when the pop-up annotation is set to specified markup annotation

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]popupAnnotHandle to a FSCRT_ANNOT object which is a pop-up annotation object.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot or popupAnnot is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_INVALIDTYPE if parameter popupAnnot does not represent a pop-up annotation.
FSCRT_ERRCODE_CONFLICT if parameter annot and popupAnnot are not in the same page, or parameter annot already has a related pop-up annotation.
FSCRT_ERRCODE_UNSUPPORTED if parameter annot is not a markup annotation, or annot is free-text annotation or sound annotation which does not need a pop-up annotation.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the intent cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
  • popupAnnot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetQuadPoints ( FSCRT_ANNOT  annot,
FSCRT_QUADPOINTSF quadPoints,
FS_INT32  count 
)

Set quadrilaterals points of an annotation.

Only link, highlight, underline, squiggly-underline and strikeout annotations can have quad-points property.
The order of quadrilaterals points should be as follow:

                (x1, y1)           (x2, y2)
                        ----------------
                        |               |
                        |               |
                        ----------------
                (x3, y3)           (x4, y4)
                
Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]quadPointsPointer to a FSCRT_QUADPOINTSF structure that specifies quadrilaterals points to be set to the annotation. This must be valid.
[in]countCount of quadrilaterals points(parameter quadPoints). And the value should be at least 1.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or quadPoints is NULL, or count is invalid.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the quadrilaterals points cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetStamp ( FSCRT_ANNOT  annot,
FSCRT_IMAGE  image,
FS_INT32  compress 
)

Set image to stamp annotation.

This function can only be used for stamp annotation.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object. This should be a stamp annotation.
[in]imageHandle to a FSCRT_IMAGE object which is an image object to be set to stamp annotation.
This object cannot be released until funcion FSPDF_Annot_ResetAppearance has been called for this stamp anntoation. And application should call function FSCRT_Image_Release to release this FSCRT_IMAGE object.
[in]compressCompress algorithm type used to compress image data. Currently, it only supports 2 valid value:
  • 0: no compress.
  • 1: do default compress.
Returns
FSCRT_ERRCODE_SUCCESS means success.
FSCRT_ERRCODE_PARAM if parameter annot, or image is NULL, or compress is out of valid range.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_INVALIDTYPE if annotation type of parameter annot is not Stamp.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if stamp cannot be set because of any other reason.
For more definitions please see macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
  • image: this handle is long-term recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetStampWithBitmap ( FSCRT_ANNOT  annot,
FSCRT_BITMAP  bitmap 
)

Set bitmap to stamp annotation.

This function can only be used for stamp annotation.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object. This should be a stamp annotation.
[in]bitmapHandle to a FSCRT_BITMAP object which is a bitmap object to be set to stamp annotation.
Returns
FSCRT_ERRCODE_SUCCESS means success.
FSCRT_ERRCODE_PARAM if parameter annot, or bitmap is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_INVALIDTYPE if annotation type of parameter annot is not "Stamp".
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if stamp cannot be set because of any other reason.
For more definitions please see macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
  • bitmap: this handle is long-term recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetState ( FSCRT_ANNOT  stateAnnot,
FS_INT32  stateModel,
FS_INT32  state 
)

Set state model and state out of a state annotation.

This function only supports markup annotations.

Parameters
[in]stateAnnotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]stateModelAn integer value that specifies the state model. Please refer to macro definitions FSPDF_ANNOTSTATEMODEL_XXX and this should be one of these macros.
[in]stateAn integer value that specifies the state. Please refer to macro definitions FSPDF_ANNOTSTATE_XXX and this should be one of these macros.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter stateAnnot is NULL, or stateModel, state is invalid.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_ERROR if the state model and state cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • stateAnnot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetSubject ( FSCRT_ANNOT  annot,
const FSCRT_BSTR subject 
)

Set subject of a markup annotation.

Only markup annotations can have subject property.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]subjectPointer to a FSCRT_BSTR structure that specifies value of subject property. It can be NULL or empty. When it is valid, it should be a valid UTF-8 string.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL.
FSCRT_ERRCODE_FORMAT if parameter subject is not in UTF-8 format if it is valid.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if the subject cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetSymbol ( FSCRT_ANNOT  annot,
const FSCRT_BSTR symbol 
)

Set symbol of a caret annotation.

Only caret annotation can have symbol property.
A symbol is associated with the caret. Valid values are:

  • P: A new paragraph symbol should be associated with the caret.
  • None: No symbol should be associated with the caret.

Usually, default value is None. Currently SDK can only support to set "None".

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]symbolPointer to a FSCRT_BSTR structure that specifies value of symbol property. Please see details description part for more information.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL,
or parameter symbol or FSCRT_BSTR::str is NULL or the FSCRT_BSTR::len is zero.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if symbol cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
Currently, application should ensure this property has been set valid to newly added caret annotation.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetTitle ( FSCRT_ANNOT  annot,
const FSCRT_BSTR title 
)

Set title of a markup annotation.

Only markup annotations can have title property. By convention, this entry can used to identify the user who added the annotation.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]titlePointer to a FSCRT_BSTR structure that specifies value of title property. It can be NULL or empty. When it is valid, it should be a valid UTF-8 string.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL.
FSCRT_ERRCODE_FORMAT if parameter title is not in UTF-8 format if it is valid.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the title cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_SetVertices ( FSCRT_ANNOT  annot,
FS_FLOAT vertices,
FS_INT32  count 
)

Set vertices of a polygon or polyline annotation.

Only polygon, and polyline annotations can have vertices property. And this property is necessary for polygon and polyline annotation.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
[in]verticesPointer to a FS_FLOAT object that specifies the new vertices array. This should be valid.
And the count of elements in this array must be a multiple of 2.
[in]countAn integer value that specifies the count of elements in new vertices array(parameter vertices) for the annotation.
It must be a multiple of 2.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, or vertices is NULL, or count is invalid.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if vertices cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Annot_Ungroup ( FSCRT_ANNOT  annot)

Ungroup an annotation from the group it belongs to.

This function only supports markup annotations.

Parameters
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if input annotation is not a markup annotation or annotation cannot be un-grouped because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Archive_DeserializeAnnot ( FSCRT_ARCHIVE  archive,
FSCRT_PAGE  page,
FSCRT_ANNOT *  annot 
)

De-serialize the annotation.

This function can de-serialize the serialized information of annotations' data into the specified PDF page. Currently, this function does not support to de-serialize annotations of following types: Watermark, 3D, PrinterMark, TrapNet, Sound, Movie, Screen, PSInk.
This function should be called after function FSPDF_Archive_SerializeAnnot.

Parameters
[in]archiveHandle to a FSCRT_ARCHIVE object which is an annotation object. Call function FSCRT_Archive_Release to release this handle when no need to use it any more.
[in]pageHandle to a valid FSCRT_PAGE object.
[out]annotPointer to a FSCRT_ANNOT handle that receives the annotation as the deseralized result. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot, archive or page is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_UNSUPPORTED if type of input annotation is not currently supported.
FSCRT_ERRCODE_INVALIDTYPE if parameter page is not a type of PDF page.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if the annotation cannot be de-serialized because of any other reason, or this function is called repeatedly with same archive.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
  • This function only allow to be called once for a FSCRT_ARCHIVE object.
  • For widget annotation, user is strongly suggested to use functions in PDF Form module for widget related to form object.
Attention
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • archive: this handle is long-term partially recoverable.
  • page: this handle is long-term partially recoverable.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Archive_SerializeAnnot ( FSCRT_ARCHIVE  archive,
FSCRT_PAGE  page,
FSCRT_ANNOT  annot 
)

Serialize the annotation.

@

This function can serialize the specified annotation data into memory and then call function FSPDF_Archive_DeserializeAnnot to de-serialize annotations to any other PDF pages to recover the annotations into that page.

Parameters
[in]archiveHandle to a FSCRT_ARCHIVE object which is an annotation object. This should be returned by function FSCRT_Archive_Create. Call function FSCRT_Archive_Release to release this handle when no need to use it any more.
[in]pageHandle to a valid FSCRT_PAGE object.
[in]annotHandle to a FSCRT_ANNOT object which is an annotation object.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter annot is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_INVALIDTYPE if parameter page or annot is not a related type of PDF.
FSCRT_ERRCODE_ERROR if the annotation cannot be serialized because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
For widget annotation, user is strongly suggested to use functions in PDF Form module for widget related to form object.
Attention
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • archive: this handle is long-term partially recoverable.
  • page: this handle is long-term partially recoverable.
  • annot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Page_LoadAnnots ( FSCRT_PAGE  page)

Load annotations from a PDF page.

This should be called before any other functions in PDF annotation module are used.
For widget annotation, use functions in PDF Form module for most operations of widget.
For watermark annotation, use functions in PDF Watermark module for most operations of watermark.

Parameters
[in]pageHandle to a FSCRT_PAGE object which is a PDF page object.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter page is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or accessing annotation is not allowed.
FSCRT_ERRCODE_INVALIDTYPE if parameter page is not a type of PDF page.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if annotations cannot be loaded because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • page: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Page_UnloadAnnots ( FSCRT_PAGE  page)

Unload annotations of a PDF page.

This should be called when there is no more operation on annotations in this PDF page.

Parameters
[in]pageHandle to a FSCRT_PAGE object which is a PDF page object.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter page is NULL.
FSCRT_ERRCODE_INVALIDTYPE if parameter page is not a type of PDF page.
FSCRT_ERRCODE_ERROR if annotations cannot be unloaded because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it to process same objects between multi-threads, or the application should maintain thread safety when it needs to process same objects under multi-threaded environments.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term recoverable.
  • page: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_RenderContext_StartAnnots ( FSPDF_RENDERCONTEXT  pdfRenderContext,
FSCRT_RENDERER  renderer,
const FSCRT_ANNOT *  annots,
FS_INT32  count,
FSCRT_PROGRESS *  renderProgress 
)

Render annotations on render context.

This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX, except FSPDF_ANNOTTYPE_WIDGET.
It will take a long time to render annotations with complex or large contents, so Foxit PDF SDK uses a progressive process to do this.
Caller should pass parameter renderProgress to function FSCRT_Progress_Continue to continue rendering in steps. It is necessary to call function FSCRT_Progress_Release to destroy renderProgress object if rendering process is done. ATTENTION: This function does not support to render form controls. Please use render method in PDF Form module.

Parameters
[in]pdfRenderContextHandle to a FSPDF_RENDERCONTEXT object which is a render context object.
[in]rendererHandle to a FSCRT_RENDERER object which is a renderer object.
[in]annotsPointer to a FSCRT_ANNOT handle which specifies an annotation array. Annotations in this array should be on the same page.
[in]countSize of an annotation array.
[out]renderProgressPointer to a FSCRT_PROGRESS handle that receives a handle of progressive process. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter pdfRenderContext, renderer, annots or elements in annots, or renderProgress is NULL, or count is invalid.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if render annotations fails because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • pdfRenderContext: this handle is long-term recoverable.
  • renderer: this handle is long-term recoverable.
  • annots: this handle is short-term.
  • renderProgress: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_RenderContext_StartPageAnnots ( FSPDF_RENDERCONTEXT  pdfRenderContext,
FSCRT_RENDERER  renderer,
FSCRT_PAGE  page,
FSCRT_PROGRESS *  renderProgress 
)

Render all annotations of a page on render context.

This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX, except FSPDF_ANNOTTYPE_WIDGET.
It will take a long time to render annotations with complex or large contents, so Foxit PDF SDK uses a progressive process to do this.
Caller should pass parameter renderProgress to function FSCRT_Progress_Continue to continue rendering in steps, and should call function FSCRT_Progress_Release to destroy renderProgress object if rendering process is done. ATTENTION: This function does not support to render form controls. Please use render method in PDF Form module.

Parameters
[in]pdfRenderContextHandle to a FSPDF_RENDERCONTEXT object which is a PDF render context object.
[in]rendererHandle to a FSCRT_RENDERER object which is a renderer object.
[in]pageHandle to a FSCRT_PAGE object which is a PDF page object.
[out]renderProgressPointer to a FSCRT_PROGRESS handle that receives a handle of progressive process. If there is any error, it will be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter pdfRenderContext, renderer, page, or renderProgress is NULL.
FSCRT_ERRCODE_UNKNOWNSTATE if page annotations are not loaded.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_INVALIDTYPE if parameter page is not a type of PDF page.
FSCRT_ERRCODE_ERROR if render annotations fails because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • pdfRenderContext: this handle is long-term recoverable.
  • renderer: this handle is long-term recoverable.
  • page: this handle is long-term partially recoverable.
  • renderProgress: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.

Foxit Corporation