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 | |
| |
#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. | |
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:
#define FSPDF_ANNOT_HIGHLIGHTINGMODE_TOGGLE 4 |
Highlighting mode: Toggle.
This only supports widget annotation.
#define FSPDF_ANNOTTYPE_3D "3D" |
3D annotation.
#define FSPDF_ANNOTTYPE_MOVIE "Movie" |
Movie annotation.
#define FSPDF_ANNOTTYPE_PRINTERMARK "PrinterMark" |
Printer's mark annotation.
#define FSPDF_ANNOTTYPE_PSI "PSInk" |
Pressure Sensitive Ink annotation. Currently not support.
#define FSPDF_ANNOTTYPE_SCREEN "Screen" |
Screen annotation.
#define FSPDF_ANNOTTYPE_SOUND "Sound" |
Sound annotation, markup type.
#define FSPDF_ANNOTTYPE_TRAPNET "TrapNet" |
Trap network annotation.
#define FSPDF_ANNOTTYPE_WATERMARK "Watermark" |
Watermark annotation.
#define FSPDF_ANNOTTYPE_WIDGET "Widget" |
Widget annotation.
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.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page object. |
[in] | rect | Pointer 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] | annotType | Pointer 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] | filter | Pointer 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:
|
[in] | index | The 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] | annot | Pointer to a FSCRT_ANNOT handle that receives the newly added annotation. If there is any error, it will be NULL. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | stateModel | An integer value that specifies the state model. Please refer to macro definitions FSPDF_ANNOTSTATEMODEL_XXX and this should be one of these macros. |
[in] | state | An integer value that specifies the state. Please refer to macro definitions FSPDF_ANNOTSTATE_XXX and this should be one of these macros. |
[out] | stateAnnot | Pointer to a FSCRT_ANNOT handle which receive the state annotation. If there is any error, it will be NULL. |
Count actions associated with an annotation.
Only link , screen and widget annotations can have action.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | trigger | The trigger of action. Please refer to macro definition FSPDF_TRIGGER_ANNOT_XXX and this should be one of these macros. |
[out] | count | Pointer to a FS_INT32 object that receives count of actions. If there is any error, it will be set 0. |
Count replies of a markup annotation.
This function only supports markup annotations.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | count | Pointer to a FS_INT32 object which that receives count of replies. If there is any error, it will be set 0. |
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".
[in] | annot | Handle to a FSCRT_ANNOT object which is an markup annotation object. |
[in] | stateModel | An integer value that specifies state model. Please refer to macro definitions FSPDF_ANNOTSTATEMODEL_XXX and this should be one of these macros. |
[out] | count | Pointer to a FS_INT32 object that receives count of state annotations. If there is any error, it will be set 0. |
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.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page object. |
[in] | filter | Pointer 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:
|
[in] | index | A 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] | annot | Pointer to a FSCRT_ANNOT handle that receives specific annotation. If there is any error, it will be NULL. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | trigger | The trigger of action. Please refer to macro definition FSPDF_TRIGGER_ANNOT_XXX and this should be one of these macros. |
[in] | index | The index of actions. Range: 0 to (actioncount-1). actioncount is returned by function FSPDF_Annot_CountActions. |
[out] | actionData | Pointer to a FSPDF_ACTIONDATA structure that receives action data. |
Get alignment of a free text annotation.
Only free text annotation can have alignment property.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | alignment | Pointer to a FS_INT32 object that receives value of alignment property. It would be one of the following values:
|
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.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page object. |
[in] | filter | Pointer 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:
|
[out] | annotArray | Pointer to a FSCRT_ANNOT handle array that receives specific annotation. If there is any error, it will be NULL. |
[in,out] | count | Pointer 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. |
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.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page object. |
[in] | filter | Pointer 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:
|
[in] | matrix | A matrix used to transform from device coordinate system to PDF page coordinate system. |
[in] | x | Horizontal position in device coordinate system (in pixel). |
[in] | y | Vertical position in device coordinate system (in pixel). |
[in] | tolerance | Tolerance value for point, in device coordinate system. Valid value: from 0.0f to 30.0f. |
[out] | annot | Pointer to a FSCRT_ANNOT handle that receives specified annotation. If there is any error, it will be NULL. |
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.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page object. |
[in] | filter | Pointer 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:
|
[in] | x | Horizontal position in PDF page coordinate system. |
[in] | y | Vertical position in PDF page coordinate system. |
[in] | tolerance | Tolerance value for point, in PDF page coordinate system. Valid value: from 0.0f to 30.0f. |
[out] | annot | Pointer to a FSCRT_ANNOT handle that receives specified annotation. If there is any error, it will be NULL. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | attachment | Pointer to a FSPDF_ATTACHMENT handle to receive a PDF attachment handle if successful. If there is any error, it will be NULL. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | border | Pointer to a FSPDF_ANNOTBORDER structure that receives border information. |
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:
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | x1 | Pointer to a FS_FLOAT object that receives first x position. If there is any error, it will be set 0. |
[out] | y1 | Pointer to a FS_FLOAT object that receives first y position. If there is any error, it will be set 0. |
[out] | x2 | Pointer to a FS_FLOAT object that receives second x position. If there is any error, it will be set 0. |
[out] | y2 | Pointer to a FS_FLOAT object that receives second y position. If there is any error, it will be set 0. |
[out] | x3 | Pointer to a FS_FLOAT object that receives third x position. If there is any error, it will be set 0. |
[out] | y3 | Pointer to a FS_FLOAT object that receives third y position. If there is any error, it will be set 0. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | offsetx | Pointer to a FS_FLOAT object that receives horizontal offset along annotation line from its midpoint:
|
[out] | offsety | Pointer to a FS_FLOAT object that receives vertical offset perpendicular to annotation line:
|
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:
Usually, the default value is Inline.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | captionPos | Pointer 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. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | isFillColor | A boolean value used to decide to get the fill color or the border color: TRUE for fill color, and FALSE for border color. |
[out] | color | Pointer 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. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | contents | Pointer 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. |
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.
[in] | page | Handle to a FSCRT_PAGE which is a PDF page object. |
[in] | filter | Pointer 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:
|
[out] | count | Pointer to a FS_INT32 object that receives count of annotations. If there is any error, it will be set 0. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | dt | Pointer to a FSCRT_DATETIMEZONE structure that receives value of creation time property. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | defAppearance | Pointer to a FSPDF_DEFAULTAPPEARANCE structure that receives default appearance of a free text annotation. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | bTransformIcon | A 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] | matrix | A matrix used to transform from PDF page coordinate system to device coordinate system. |
[out] | deviceRect | Pointer 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]. |
FS_RESULT FSPDF_Annot_GetDict | ( | FSCRT_ANNOT | annot, |
FSPDF_OBJECT * | dictionary | ||
) |
Get the dictionary of an annotation.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | dictionary | Pointer to a FSPDF_OBJECT handle that receives the annotation dictionary object. If there is any error, it will be NULL. |
Get flags of an annotation.
This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | flags | Pointer 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. |
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.
[in] | widgetAnnot | Handle to a FSPDF_ANNOT object which is a PDF annotation. |
[out] | formControl | Pointer to a FSCRT_FORMCONTROL handle that receives a PDF form control. If there is any error, it will be NULL. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | elements | Pointer 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] | count | Pointer 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. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | groupHeader | Pointer to a FSCRT_ANNOT handle that receives header annotation. If there is any error, it will be NULL. |
Get highlighting mode of a link or widget annotation.
Only link and widget annotations can have highlighting mode property.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | hlMode | Pointer 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. |
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).
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | iconFit | Pointer to a FSPDF_ANNOTICONFIT structure that receives value of icon fit property. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | iconName | Pointer 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. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | filter | Pointer 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:
|
[out] | index | Pointer to a FS_INT32 object that receives index of an annotation. If there is any error, it will be set -1. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | pathData | Pointer 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. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | left | Pointer to a FS_FLOAT object that receives the left margin value. If there is any error, it will be set 0. |
[out] | top | Pointer to a FS_FLOAT object that receives the top margin value. If there is any error, it will be set 0. |
[out] | right | Pointer to a FS_FLOAT object that receives the right margin value. If there is any error, it will be set 0. |
[out] | bottom | Pointer to a FS_FLOAT object that receives the bottom margin value. If there is any error, it will be set 0. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | intent | Pointer 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. |
Get leader line extension of a line annotation.
Only line annotation can have leader line extension property.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | extLength | Pointer to a FS_FLOAT object that receives value of leader line extension property. If there is any error, it will be set 0. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | length | Pointer to a FS_FLOAT object that receives value of leader line length property. If there is any error, it will be set 0. |
Get leader line offset of a line annotation.
Only line annotation can have leader line offset property.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | offset | Pointer to a FS_FLOAT object that receives value of leader line offset property. If there is any error, it will be set 0. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | startingStyle | Pointer 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] | endingStyle | Pointer 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. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | x1 | Pointer to a FS_FLOAT object that receives starting point in horizontal direction. If there is any error, it will be set 0. |
[out] | y1 | Pointer to a FS_FLOAT object that receives starting point in vertical direction. If there is any error, it will be set 0. |
[out] | x2 | Pointer to a FS_FLOAT object that receives ending point in horizontal direction. If there is any error, it will be set 0. |
[out] | y2 | Pointer to a FS_FLOAT object that receives ending point in vertical direction. If there is any error, it will be set 0. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | mkEntry | An integer to specify type of caption entry in MK dictionary. It should be one of the following macro definitions: |
[out] | caption | Pointer 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. |
Get color of specific type in MK dictionary.
Only screen and widget annotations can have color property in MK dictionary.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | mkEntry | An integer to specify the type of color entry in MK dictionary. It should be one of the following macro definitions: |
[out] | color | Pointer 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. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | mkEntry | An integer to specify the type of icon entry in MK dictionary. It should be one of the following macro definitions: |
[out] | bitmap | Pointer to a FSCRT_BITMAP handle to receive a bitmap handle of specific icon if successful. If there is any error, it will be NULL. |
Get rotation (the number of degrees) in MK dictionary.
Only screen and widget annotation can have rotation property in MK dictionary.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | degree | Pointer 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. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | dt | Pointer to a FSCRT_DATETIMEZONE structure that receives value of modification time property. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | name | Pointer 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. |
Get opacity of a markup annotation.
Only markup annotations can have opacity property.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | opacity | Pointer 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. |
Get open status of a text or pop-up annotation.
Only text and pop-up annotation can have open status property.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | isOpen | Pointer to a FS_BOOL object that receives value of open status property. If there is any error, it will be FALSE. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | popupAnnot | Pointer to a FSCRT_ANNOT handle that receives a pop-up annotation. If there is any error, it will be NULL. |
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)
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | quadPoints | Pointer 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] | count | Pointer 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. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | rect | Pointer to a FSCRT_RECTF structure that receives rectangle of an annotation. If there is any error, it will be set [0 0 0 0]. |
Get reply with specifies index of a markup annotation.
This function only supports markup annotations.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | index | The index of reply annotations. Range: 0 to (replycount-1). replycount is returned by function FSPDF_Annot_CountReplies. |
[out] | replyAnnot | Pointer to a FSCRT_ANNOT handle that receives reply annotation. If there is any error, it will be NULL. |
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".
[in] | stateAnnot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | stateModel | Pointer 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] | state | Pointer 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. |
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".
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | stateModel | An integer value that specifies state model. Please refer to macro definitions FSPDF_ANNOTSTATEMODEL_XXX and this should be one of these macros. |
[in] | index | The 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] | stateAnnot | Pointer to a FSCRT_ANNOT handle that receives a specific state annotation. If there is any error, it will be NULL. |
FS_RESULT FSPDF_Annot_GetSubject | ( | FSCRT_ANNOT | annot, |
FSCRT_BSTR * | subject | ||
) |
Get subject of a markup annotation.
Only markup annotations can have subject property.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | subject | Pointer 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. |
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:
Usually, default value is None.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | symbol | Pointer 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. |
FS_RESULT FSPDF_Annot_GetTitle | ( | FSCRT_ANNOT | annot, |
FSCRT_BSTR * | title | ||
) |
Get title of a markup annotation.
Only markup annotations can have title property.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | title | Pointer 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. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | annotType | Pointer 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. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | vertices | Pointer 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] | count | Pointer 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. |
Check if there is a caption to a line annotation.
Only line annotation can have caption contents property.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | hasCap | Pointer 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. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | mkEntry | An 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] | hasEntry | Pointer 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. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | trigger | Trigger of action. Please refer to macro definition FSPDF_TRIGGER_ANNOT_XXX and this should be one of these macros. |
[in] | index | Index 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] | actionData | Pointer to a FSPDF_ACTIONDATA structure which specifies the action data. |
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.
[in] | annot | Handle 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] | replyAnnot | Pointer 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. |
Check whether an annotation is in a group.
This function only supports markup annotations.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[out] | isGrouped | Pointer to a FS_BOOL object that receives the result. If there is any error, it will be FALSE. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | newRect | Pointer 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. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
Remove an action of specified index associated with an annotation.
Only link , screen and widget annotations can have action.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | trigger | Trigger of action. Please refer to macro definition FSPDF_TRIGGER_ANNOT_XXX and this should be one of these macros. |
[in] | index | Index of actions. Range: 0 to (actioncount-1). actioncount is returned by function FSPDF_Annot_CountActions. |
Remove all the actions associated with an annotation.
Only link , screen and widget annotations can have action.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | trigger | Trigger of action. Please refer to macro definition FSPDF_TRIGGER_ANNOT_XXX and this should be one of these macros. |
FS_RESULT FSPDF_Annot_RemoveAllReplies | ( | FSCRT_ANNOT | annot | ) |
Remove all the replies of a markup annotation.
This function only supports markup annotations.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
FS_RESULT FSPDF_Annot_RemoveAllStates | ( | FSCRT_ANNOT | annot | ) |
Remove all the state annotations associated with an annotation.
This function only supports markup annotations.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
Remove a specified entry in MK dictionary.
Only screen and widget annotations can have MK dictionary.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | mkEntry | An 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. |
Remove a reply with specified index to a markup annotation.
This function only supports markup annotations.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | index | Index of the reply annotations to be removed. Range: 0 to (replycount-1). replycount is returned by function FSPDF_Annot_CountReplies. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | trigger | The trigger of action. Please refer to macro definition FSPDF_TRIGGER_ANNOT_XXX and this should be one of these macros. |
[in] | index | Index of actions. Range: 0 to (actioncount-1). actioncount is returned by function FSPDF_Annot_CountActions. |
[in] | actionData | Pointer to a FSPDF_ACTIONDATA structure which specifies the action data. |
Set alignment of a free text annotation.
Only free text annotation can have alignment property.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | alignment | Alignment value to be set to the annotation. It should be one of the following macro definitions:
|
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | attachment | Pointer to a FSPDF_ATTACHMENT handle to be set to a file attachment annotation. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | border | Pointer to a FSPDF_ANNOTBORDER structure to specify border information. |
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:
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | x1 | A float value to specify the new first x position. |
[in] | y1 | A float value to specify the new first y position. |
[in] | x2 | A float value to specify the new second x position. |
[in] | y2 | A float value to specify the new second y position. |
[in] | x3 | A float value to specify the new third x position. |
[in] | y3 | A float value to specify the new third y position. |
Set flag which decides whether to set a caption to the annotation or not.
Only line annotation can have caption contents property.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | hasCap | A boolean value that specifies whether to set a caption the annotation or not. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | offsetx | A 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] | offsety | A 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. |
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:
Usually, the default value is Inline.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | captionPos | Pointer to a FSCRT_BSTR structure to specify value of caption position property. Please see "details" description part for more information. |
Set filling or bordering color of an annotation.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | isFillColor | A boolean value used to decide to set the fill color or the border color: TRUE for fill color, and FALSE for border color. |
[in] | color | Pointer to a FS_ARGB object that sets value of specific type color property. Format: 0xAARRGGBB, and alpha value is ignored. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | contents | Pointer 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. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | dt | Pointer to a FSCRT_DATETIMEZONE structure that specifies value of creation time property. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | defAppearance | Pointer to a FSPDF_DEFAULTAPPEARANCE structure to specify default appearance. |
Set flags of an annotation.
This function can support all types defined in macro definitions FSPDF_ANNOTTYPE_XXX.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | flags | The 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. |
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.
[in] | annots | Pointer to a FSCRT_ANNOT handle which is an annotation array. This array should contain at least 2 elements. |
[in] | count | Size of the annotation array. |
[in] | headerIndex | Index of an annotation in the annotation array. Annotation with this index will become the group header. Range: 0 to (count-1). |
Set highlighting mode of a link or widget annotation.
Only link and widget annotations can have the highlighting mode property.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | hlMode | Highlighting mode to be set to the annotation. It should be one of the following macro definitions: |
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).
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | iconFit | Pointer to a FSPDF_ANNOTICONFIT structure to specify icon fit. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | iconName | Pointer 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. |
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.
[in] | iconProvider | Pointer to a FSPDF_ICONPROVIDER structure. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | pathData | Handle 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:
|
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | left | A float value to specify the new left margin value. It should not be negative. |
[in] | top | A float value to specify the new top margin value. It should not be negative. |
[in] | right | A float value to specify the new right margin value. It should not be negative. |
[in] | bottom | A float value to specify the new bottom margin value. It should not be negative. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | intent | Pointer 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,
|
Set leader line extension of a line annotation.
Only line annotation can have leader line extension property.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | extLength | A float value to specify new value of leader line extension property. It should be non-negative. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | length | A float value to specify new value of leader line length property. |
Set leader line offset of a line annotation.
Only line annotation can have leader line offset property.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | offset | A float value to specify new value of leader line offset property. It should be non-negative. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | startingStyle | Pointer 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] | endingStyle | Pointer 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. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | x1 | A float value to specify the new starting point in horizontal direction. |
[in] | y1 | A float value to specify the new starting point in vertical direction. |
[in] | x2 | A float value to specify the new ending point in horizontal direction. |
[in] | y2 | A float value to specify the new ending point in vertical direction. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | mkEntry | An integer to specify the type of caption entry in MK dictionary. It should be one of the following macro definitions: |
[in] | caption | Pointer 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. |
Set color of specific type in MK dictionary.
Only screen and widget annotations can have color property in MK dictionary.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | mkEntry | An integer to specify the type of color entry in MK dictionary. It should be one of the following macro definitions: |
[in] | color | Pointer to a FS_ARGB object that receives color of specific type. Format: 0xAARRGGBB, and alpha value is ignored. |
Set a bitmap to a specific icon entry in MK dictionary.
Only widget annotation can have icon property in MK dictionary.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | mkEntry | An integer to specify the type of icon entry in MK dictionary. It should be one of the following macro definitions: |
[in] | bitmap | Pointer to a FSCRT_BITMAP handle which specifies the new icon bitmap. |
Set an image to a specific icon entry in MK dictionary.
Only widget annotation can have icon property in MK dictionary.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | mkEntry | An integer to specify the type of icon entry in MK dictionary. It should be one of the following macro definitions: |
[in] | image | Pointer 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. |
Set rotation in MK dictionary.
Only screen and widget annotations can have rotation property in MK dictionary.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | degree | An integer that specifies the new value of rotation entry. The value must be a multiple of 90. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | dt | Pointer to a FSCRT_DATETIMEZONE structure that specifies value of modification time property. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | name | Pointer 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. |
Set opacity of an annotation.
Only markup annotations can have opacity property.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | opacity | Opacity value to be set to the annotation. Valid range is from 0.0 to 1.0. |
Set open status of a text or pop-up annotation.
Only text and pop-up annotations can have the open status property.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | status | A boolean value used to specify the open status to be set to the annotation. |
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
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | popupAnnot | Handle to a FSCRT_ANNOT object which is a pop-up annotation object. |
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)
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | quadPoints | Pointer to a FSCRT_QUADPOINTSF structure that specifies quadrilaterals points to be set to the annotation. This must be valid. |
[in] | count | Count of quadrilaterals points(parameter quadPoints). And the value should be at least 1. |
Set image to stamp annotation.
This function can only be used for stamp annotation.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. This should be a stamp annotation. |
[in] | image | Handle 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] | compress | Compress algorithm type used to compress image data. Currently, it only supports 2 valid value:
|
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. This should be a stamp annotation. |
[in] | bitmap | Handle to a FSCRT_BITMAP object which is a bitmap object to be set to stamp annotation. |
Set state model and state out of a state annotation.
This function only supports markup annotations.
[in] | stateAnnot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | stateModel | An integer value that specifies the state model. Please refer to macro definitions FSPDF_ANNOTSTATEMODEL_XXX and this should be one of these macros. |
[in] | state | An integer value that specifies the state. Please refer to macro definitions FSPDF_ANNOTSTATE_XXX and this should be one of these macros. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | subject | Pointer 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. |
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:
Usually, default value is None. Currently SDK can only support to set "None".
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | symbol | Pointer to a FSCRT_BSTR structure that specifies value of symbol property. Please see details description part for more information. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | title | Pointer 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. |
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.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
[in] | vertices | Pointer 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] | count | An integer value that specifies the count of elements in new vertices array(parameter vertices) for the annotation. It must be a multiple of 2. |
FS_RESULT FSPDF_Annot_Ungroup | ( | FSCRT_ANNOT | annot | ) |
Ungroup an annotation from the group it belongs to.
This function only supports markup annotations.
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
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.
[in] | archive | Handle 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] | page | Handle to a valid FSCRT_PAGE object. |
[out] | annot | Pointer to a FSCRT_ANNOT handle that receives the annotation as the deseralized result. If there is any error, it will be NULL. |
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.
[in] | archive | Handle 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] | page | Handle to a valid FSCRT_PAGE object. |
[in] | annot | Handle to a FSCRT_ANNOT object which is an annotation object. |
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.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page object. |
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.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page object. |
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.
[in] | pdfRenderContext | Handle to a FSPDF_RENDERCONTEXT object which is a render context object. |
[in] | renderer | Handle to a FSCRT_RENDERER object which is a renderer object. |
[in] | annots | Pointer to a FSCRT_ANNOT handle which specifies an annotation array. Annotations in this array should be on the same page. |
[in] | count | Size of an annotation array. |
[out] | renderProgress | Pointer to a FSCRT_PROGRESS handle that receives a handle of progressive process. If there is any error, it will be NULL. |
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.
[in] | pdfRenderContext | Handle to a FSPDF_RENDERCONTEXT object which is a PDF render context object. |
[in] | renderer | Handle to a FSCRT_RENDERER object which is a renderer object. |
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page object. |
[out] | renderProgress | Pointer to a FSCRT_PROGRESS handle that receives a handle of progressive process. If there is any error, it will be NULL. |