fpdf_annot_w.h
Go to the documentation of this file.
1 
48 #ifndef _FSPDF_ANNOT_W_H_
49 #define _FSPDF_ANNOT_W_H_
50 
86 #ifdef __cplusplus
87 extern "C" {
88 #endif
89 
90 /*******************************************************************************/
91 /* Add and remove annotation */
92 /*******************************************************************************/
147 FS_RESULT FSPDF_Annot_Add(FSCRT_PAGE page, const FSCRT_RECTF* rect, const FSCRT_BSTR* annotType, const FSCRT_BSTR* filter,
148  FS_INT32 index, FSCRT_ANNOT* annot);
149 
176 FS_RESULT FSPDF_Annot_Remove(FSCRT_ANNOT annot);
177 
178 /*******************************************************************************/
179 /* Annotation common properties */
180 /*******************************************************************************/
209 FS_RESULT FSPDF_Annot_Move(FSCRT_ANNOT annot, const FSCRT_RECTF* newRect);
210 
238 FS_RESULT FSPDF_Annot_SetFlags(FSCRT_ANNOT annot, FS_DWORD flags);
239 
269 FS_RESULT FSPDF_Annot_SetName(FSCRT_ANNOT annot, const FSCRT_BSTR* name);
270 
298 FS_RESULT FSPDF_Annot_SetSubject(FSCRT_ANNOT annot, const FSCRT_BSTR* subject);
299 
327 FS_RESULT FSPDF_Annot_SetTitle(FSCRT_ANNOT annot, const FSCRT_BSTR* title);
328 
359 FS_RESULT FSPDF_Annot_SetContents(FSCRT_ANNOT annot, const FSCRT_BSTR* contents);
360 
393 FS_RESULT FSPDF_Annot_SetIconName(FSCRT_ANNOT annot, const FSCRT_BSTR* iconName);
394 
423 FS_RESULT FSPDF_Annot_SetBorder(FSCRT_ANNOT annot, const FSPDF_ANNOTBORDER* border);
424 
459 FS_RESULT FSPDF_Annot_SetColor(FSCRT_ANNOT annot, FS_BOOL isFillColor, FS_ARGB color);
460 
487 FS_RESULT FSPDF_Annot_SetOpacity(FSCRT_ANNOT annot, FS_FLOAT opacity);
488 
520 FS_RESULT FSPDF_Annot_SetAlignment(FSCRT_ANNOT annot, FS_INT32 alignment);
521 
546 FS_RESULT FSPDF_Annot_SetCreationDateTime(FSCRT_ANNOT annot, const FSCRT_DATETIMEZONE* dt);
547 
574 FS_RESULT FSPDF_Annot_SetModifiedDateTime(FSCRT_ANNOT annot, const FSCRT_DATETIMEZONE* dt);
575 
611 FS_RESULT FSPDF_Annot_SetIntent(FSCRT_ANNOT annot, const FSCRT_BSTR* intent);
612 
645 FS_RESULT FSPDF_Annot_SetPopup(FSCRT_ANNOT annot, FSCRT_ANNOT popupAnnot);
646 
671 FS_RESULT FSPDF_Annot_SetOpenStatus(FSCRT_ANNOT annot, FS_BOOL status);
672 
707 FS_RESULT FSPDF_Annot_SetHighlightingMode(FSCRT_ANNOT annot, FS_INT32 hlMode);
708 
745 FS_RESULT FSPDF_Annot_SetQuadPoints(FSCRT_ANNOT annot, FSCRT_QUADPOINTSF* quadPoints, FS_INT32 count);
746 
786 
823 FS_RESULT FSPDF_Annot_SetInnerRectMargin(FSCRT_ANNOT annot, FS_FLOAT left, FS_FLOAT top, FS_FLOAT right, FS_FLOAT bottom);
824 
854 FS_RESULT FSPDF_Annot_SetLineEndingStyles(FSCRT_ANNOT annot, const FSCRT_BSTR* startingStyle, const FSCRT_BSTR* endingStyle);
855 
883 FS_RESULT FSPDF_Annot_SetLinePosition(FSCRT_ANNOT annot, FS_FLOAT x1, FS_FLOAT y1, FS_FLOAT x2, FS_FLOAT y2);
884 
913 FS_RESULT FSPDF_Annot_SetLeaderLineLength(FSCRT_ANNOT annot, FS_FLOAT length);
914 
939 FS_RESULT FSPDF_Annot_SetLeaderLineExtension(FSCRT_ANNOT annot, FS_FLOAT extLength);
940 
965 FS_RESULT FSPDF_Annot_SetLeaderLineOffset(FSCRT_ANNOT annot, FS_FLOAT offset);
966 
991 FS_RESULT FSPDF_Annot_SetCaptionContents(FSCRT_ANNOT annot, FS_BOOL hasCap);
992 
1026 FS_RESULT FSPDF_Annot_SetCaptionPosition(FSCRT_ANNOT annot, const FSCRT_BSTR* captionPos);
1027 
1057 FS_RESULT FSPDF_Annot_SetCaptionOffset(FSCRT_ANNOT annot, FS_FLOAT offsetx, FS_FLOAT offsety);
1058 
1086 FS_RESULT FSPDF_Annot_SetVertices(FSCRT_ANNOT annot, FS_FLOAT* vertices, FS_INT32 count);
1087 
1122 FS_RESULT FSPDF_Annot_SetSymbol(FSCRT_ANNOT annot, const FSCRT_BSTR* symbol);
1123 
1163 FS_RESULT FSPDF_Annot_SetInkList(FSCRT_ANNOT annot, FSCRT_PATHDATA pathData);
1164 
1191 FS_RESULT FSPDF_Annot_SetAttachment(FSCRT_ANNOT annot, FSPDF_ATTACHMENT attachment);
1192 
1218 FS_RESULT FSPDF_Annot_SetDefaultAppearance(FSCRT_ANNOT annot, const FSPDF_DEFAULTAPPEARANCE* defAppearance);
1219 
1249 FS_RESULT FSPDF_Annot_SetIconFit(FSCRT_ANNOT annot, const FSPDF_ANNOTICONFIT* iconFit);
1250 
1279 FS_RESULT FSPDF_Annot_RemoveMKEntry(FSCRT_ANNOT annot, FS_INT32 mkEntry);
1280 
1307 FS_RESULT FSPDF_Annot_SetMKRotation(FSCRT_ANNOT annot, FS_INT32 degree);
1308 
1340 FS_RESULT FSPDF_Annot_SetMKColor(FSCRT_ANNOT annot, FS_INT32 mkEntry, FS_ARGB color);
1341 
1376 FS_RESULT FSPDF_Annot_SetMKCaption(FSCRT_ANNOT annot, FS_INT32 mkEntry, const FSCRT_BSTR* caption);
1377 
1411 FS_RESULT FSPDF_Annot_SetMKIconBitmap(FSCRT_ANNOT annot, FS_INT32 mkEntry, FSCRT_BITMAP bitmap);
1412 
1449 FS_RESULT FSPDF_Annot_SetMKIconImage(FSCRT_ANNOT annot, FS_INT32 mkEntry, FSCRT_IMAGE image);
1450 
1451 #ifndef _FSPDF_DEF_ICONPROVIDER_
1452 #define _FSPDF_DEF_ICONPROVIDER_
1453 
1456 typedef struct _FSPDF_ICONPROVIDER
1457 {
1460 
1463 
1473  FS_RESULT (*Release)(FS_LPVOID clientData);
1474 
1488  FS_RESULT (*GetProviderID)(FS_LPVOID clientData, FSCRT_BSTR* str, FS_DWORD* ver);
1489 
1509  FS_RESULT (*HasIcon)(FS_LPVOID clientData, const FSCRT_BSTR* iconType, const FSCRT_BSTR* iconID, FS_BOOL* hasIcon);
1510 
1526  FS_RESULT (*CanChangeColor)(FS_LPVOID clientData, const FSCRT_BSTR* iconType, const FSCRT_BSTR* iconID, FS_BOOL* canChange);
1527 
1544  FS_RESULT (*GetIcon)(FS_LPVOID clientData, const FSCRT_BSTR* iconType, const FSCRT_BSTR* iconID, FS_ARGB color, FSCRT_PAGE* page);
1545 
1565  FS_RESULT (*SetShadingColor)(FS_LPVOID clientData, const FSCRT_BSTR* iconType, const FSCRT_BSTR* iconID, FS_ARGB refColor,
1566  FS_INT32 shadingIndex, FS_ARGB* c1, FS_ARGB* c2);
1567 
1584  FS_RESULT (*GetDisplaySize)(FS_LPVOID clientData, const FSCRT_BSTR* iconType, const FSCRT_BSTR* iconID, FS_FLOAT* width, FS_FLOAT* height);
1585 
1587 #endif //_FSPDF_DEF_ICONPROVIDER_
1588 
1616 
1651 FS_RESULT FSPDF_Annot_SetStamp(FSCRT_ANNOT annot, FSCRT_IMAGE image, FS_INT32 compress);
1652 
1680 FS_RESULT FSPDF_Annot_SetStampWithBitmap(FSCRT_ANNOT annot, FSCRT_BITMAP bitmap);
1681 
1682 /*******************************************************************************/
1683 /* Markup controls */
1684 /*******************************************************************************/
1717 FS_RESULT FSPDF_Annot_AddState(FSCRT_ANNOT annot, FS_INT32 stateModel, FS_INT32 state, FSCRT_ANNOT* stateAnnot);
1718 
1746 FS_RESULT FSPDF_Annot_SetState(FSCRT_ANNOT stateAnnot, FS_INT32 stateModel, FS_INT32 state);
1747 
1771 FS_RESULT FSPDF_Annot_RemoveAllStates(FSCRT_ANNOT annot);
1772 
1803 FS_RESULT FSPDF_Annot_SetGroup(FSCRT_ANNOT* annots, FS_INT32 count, FS_INT32 headerIndex);
1804 
1828 FS_RESULT FSPDF_Annot_Ungroup(FSCRT_ANNOT annot);
1829 
1861 FS_RESULT FSPDF_Annot_InsertReply(FSCRT_ANNOT annot, FS_INT32 index, FSCRT_ANNOT* replyAnnot);
1862 
1890 FS_RESULT FSPDF_Annot_RemoveReply(FSCRT_ANNOT annot, FS_INT32 index);
1891 
1916 FS_RESULT FSPDF_Annot_RemoveAllReplies(FSCRT_ANNOT annot);
1917 
1918 /*******************************************************************************/
1919 /* Annotation trigger actions */
1920 /*******************************************************************************/
1951 FS_RESULT FSPDF_Annot_SetAction(FSCRT_ANNOT annot, FS_INT32 trigger, FS_INT32 index, const FSPDF_ACTIONDATA* actionData);
1952 
1983 FS_RESULT FSPDF_Annot_InsertAction(FSCRT_ANNOT annot, FS_INT32 trigger, FS_INT32 index, const FSPDF_ACTIONDATA* actionData);
1984 
2014 FS_RESULT FSPDF_Annot_RemoveAction(FSCRT_ANNOT annot, FS_INT32 trigger, FS_INT32 index);
2015 
2044 FS_RESULT FSPDF_Annot_RemoveAllActions(FSCRT_ANNOT annot, FS_INT32 trigger);
2045 
2046 /*******************************************************************************/
2047 /* Reset annotation */
2048 /*******************************************************************************/
2082 FS_RESULT FSPDF_Annot_ResetAppearance(FSCRT_ANNOT annot);
2083 
2115 FS_RESULT FSPDF_Archive_SerializeAnnot(FSCRT_ARCHIVE archive, FSCRT_PAGE page, FSCRT_ANNOT annot);
2116 
2156 FS_RESULT FSPDF_Archive_DeserializeAnnot(FSCRT_ARCHIVE archive, FSCRT_PAGE page, FSCRT_ANNOT* annot);
2157 
2158 #ifdef __cplusplus
2159 };
2160 #endif
2161  /* group FPDFANNOT */
2163 
2164 #endif /* _FSPDF_ANNOT_W_H_ */
2165 
FS_RESULT FSPDF_Annot_SetTitle(FSCRT_ANNOT annot, const FSCRT_BSTR *title)
Set title of a markup annotation.
FS_RESULT FSPDF_Annot_RemoveReply(FSCRT_ANNOT annot, FS_INT32 index)
Remove a reply with specified index to a markup annotation.
Structure for annotation border.
Definition: fpdf_annot_r.h:851
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.
FS_RESULT FSPDF_Annot_SetState(FSCRT_ANNOT stateAnnot, FS_INT32 stateModel, FS_INT32 state)
Set state model and state out of a state annotation.
FS_RESULT FSPDF_Annot_SetContents(FSCRT_ANNOT annot, const FSCRT_BSTR *contents)
Set contents of an annotation.
FS_RESULT FSPDF_Annot_SetColor(FSCRT_ANNOT annot, FS_BOOL isFillColor, FS_ARGB color)
Set filling or bordering color of an annotation.
Structure for rectangle, in float.
Definition: fs_base_r.h:2078
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.
float FS_FLOAT
32-bit floating-point number, single precision.
Definition: fs_base_r.h:148
FS_RESULT FSPDF_Annot_SetModifiedDateTime(FSCRT_ANNOT annot, const FSCRT_DATETIMEZONE *dt)
Set modification time of an annotation.
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.
FS_RESULT FSPDF_Annot_Ungroup(FSCRT_ANNOT annot)
Ungroup an annotation from the group it belongs to.
FS_RESULT FSPDF_Annot_SetGroup(FSCRT_ANNOT *annots, FS_INT32 count, FS_INT32 headerIndex)
Group all the input annotations.
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.
FS_RESULT FSPDF_Annot_RemoveAllActions(FSCRT_ANNOT annot, FS_INT32 trigger)
Remove all the actions associated with an annotation.
FS_RESULT FSPDF_Annot_SetSubject(FSCRT_ANNOT annot, const FSCRT_BSTR *subject)
Set subject of a markup annotation.
FS_RESULT FSPDF_Annot_SetMKCaption(FSCRT_ANNOT annot, FS_INT32 mkEntry, const FSCRT_BSTR *caption)
Set caption of a specific type in MK dictionary.
FS_RESULT FSPDF_Annot_SetOpacity(FSCRT_ANNOT annot, FS_FLOAT opacity)
Set opacity of an annotation.
FS_RESULT FSPDF_Annot_SetAttachment(FSCRT_ANNOT annot, FSPDF_ATTACHMENT attachment)
Set attachment of a file attachment annotation.
FS_RESULT FSPDF_Annot_SetIconName(FSCRT_ANNOT annot, const FSCRT_BSTR *iconName)
Set icon name of an annotation.
unsigned int FS_DWORD
32-bit unsigned integer.
Definition: fs_base_r.h:142
FS_LPVOID clientData
A user pointer, used by the application.
Definition: fpdf_annot_w.h:1462
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.
FS_RESULT FSPDF_Annot_RemoveMKEntry(FSCRT_ANNOT annot, FS_INT32 mkEntry)
Remove a specified entry in MK dictionary.
FS_RESULT FSPDF_Annot_SetFlags(FSCRT_ANNOT annot, FS_DWORD flags)
Set flags of an annotation.
FS_RESULT FSPDF_Annot_SetStampWithBitmap(FSCRT_ANNOT annot, FSCRT_BITMAP bitmap)
Set bitmap to stamp annotation.
FS_RESULT FSPDF_Annot_SetQuadPoints(FSCRT_ANNOT annot, FSCRT_QUADPOINTSF *quadPoints, FS_INT32 count)
Set quadrilaterals points of an annotation.
FS_RESULT FSPDF_Annot_SetCreationDateTime(FSCRT_ANNOT annot, const FSCRT_DATETIMEZONE *dt)
Set creation time of a markup annotation.
FS_RESULT FSPDF_Annot_Remove(FSCRT_ANNOT annot)
Remove an annotation from page.
FS_RESULT FSPDF_Annot_SetStamp(FSCRT_ANNOT annot, FSCRT_IMAGE image, FS_INT32 compress)
Set image to stamp annotation.
int FS_INT32
32-bit signed integer.
Definition: fs_base_r.h:175
FS_RESULT FSPDF_Annot_RemoveAllStates(FSCRT_ANNOT annot)
Remove all the state annotations associated with an annotation.
Structure for date and time.
Definition: fs_base_r.h:2018
FS_RESULT FSPDF_Annot_SetIntent(FSCRT_ANNOT annot, const FSCRT_BSTR *intent)
Set intent of a markup annotation.
FS_RESULT FSPDF_Annot_RemoveAction(FSCRT_ANNOT annot, FS_INT32 trigger, FS_INT32 index)
Remove an action of specified index associated with an annotation.
FS_RESULT FSPDF_Annot_SetSymbol(FSCRT_ANNOT annot, const FSCRT_BSTR *symbol)
Set symbol of a caret annotation.
FS_RESULT FSPDF_Archive_DeserializeAnnot(FSCRT_ARCHIVE archive, FSCRT_PAGE page, FSCRT_ANNOT *annot)
De-serialize the annotation.
FS_RESULT FSPDF_Annot_SetName(FSCRT_ANNOT annot, const FSCRT_BSTR *name)
Set name of an annotation.
Structure for default appearance.
Definition: fpdf_base_r.h:278
FS_RESULT FSPDF_Annot_SetLeaderLineLength(FSCRT_ANNOT annot, FS_FLOAT length)
Set leader line length of a line annotation.
FS_RESULT FSPDF_Annot_SetLineEndingStyles(FSCRT_ANNOT annot, const FSCRT_BSTR *startingStyle, const FSCRT_BSTR *endingStyle)
Set line ending styles of an annotation.
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...
Structure for annotation icon fit.
Definition: fpdf_annot_r.h:784
Structure for an action data.
Definition: fpdf_base_r.h:841
FS_RESULT FSPDF_Annot_SetOpenStatus(FSCRT_ANNOT annot, FS_BOOL status)
Set open status of a text or pop-up annotation.
FS_RESULT FSPDF_Annot_SetIconFit(FSCRT_ANNOT annot, const FSPDF_ANNOTICONFIT *iconFit)
Set icon fit of a 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.
FS_RESULT FSPDF_Annot_Move(FSCRT_ANNOT annot, const FSCRT_RECTF *newRect)
Move an annotation to a new position specified by a rectangle.
Structure for the provider of alternate icons.
Definition: fpdf_annot_w.h:1456
int FS_BOOL
Boolean type (This should be TRUE or FALSE).
Definition: fs_base_r.h:133
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.
FS_RESULT FSPDF_Annot_SetInkList(FSCRT_ANNOT annot, FSCRT_PATHDATA pathData)
Set ink list data of an ink annotation.
FS_RESULT FSPDF_Annot_RemoveAllReplies(FSCRT_ANNOT annot)
Remove all the replies of a markup annotation.
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.
void * FS_LPVOID
A pointer to any types.
Definition: fs_base_r.h:127
FS_RESULT FSPDF_Annot_SetLeaderLineExtension(FSCRT_ANNOT annot, FS_FLOAT extLength)
Set leader line extension of a line annotation.
FS_RESULT FSPDF_Annot_SetHighlightingMode(FSCRT_ANNOT annot, FS_INT32 hlMode)
Set highlighting mode of a link or widget annotation.
FS_RESULT FSPDF_Archive_SerializeAnnot(FSCRT_ARCHIVE archive, FSCRT_PAGE page, FSCRT_ANNOT annot)
Serialize the annotation.
unsigned int FS_ARGB
ARGB color type, 32 bits, ((b) | ((g) << 8) | ((r) << 16)) | ((a) << 24)
Definition: fs_base_r.h:145
FS_RESULT FSPDF_Annot_SetMKColor(FSCRT_ANNOT annot, FS_INT32 mkEntry, FS_ARGB color)
Set color of specific type in MK dictionary.
Structure for byte string.
Definition: fs_base_r.h:611
FS_RESULT FSPDF_Annot_SetCaptionPosition(FSCRT_ANNOT annot, const FSCRT_BSTR *captionPos)
Set caption position of a line annotation.
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.
FS_RESULT FSPDF_Annot_ResetAppearance(FSCRT_ANNOT annot)
Reset(regenerate) appearance of an annotation.
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.
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.
FS_RESULT FSPDF_Annot_SetLeaderLineOffset(FSCRT_ANNOT annot, FS_FLOAT offset)
Set leader line offset of a line annotation.
FS_RESULT FSPDF_Annot_SetIconProvider(FSPDF_ICONPROVIDER *iconProvider)
Set icon provider to SDK management.
FS_RESULT FSPDF_Annot_SetVertices(FSCRT_ANNOT annot, FS_FLOAT *vertices, FS_INT32 count)
Set vertices of a polygon or polyline annotation.
FS_RESULT FSPDF_Annot_SetCaptionOffset(FSCRT_ANNOT annot, FS_FLOAT offsetx, FS_FLOAT offsety)
Set caption offset of a line annotation.
FS_DWORD lStructSize
The size of the data structure. It must be set to sizeof(FSPDF_ICONPROVIDER).
Definition: fpdf_annot_w.h:1459
int FS_RESULT
Result code for functions in Foxit PDF SDK.
Definition: fs_base_r.h:160
FS_RESULT FSPDF_Annot_SetPopup(FSCRT_ANNOT annot, FSCRT_ANNOT popupAnnot)
Set a pop-up annotation to a specific markup annotation.
FS_RESULT FSPDF_Annot_SetMKRotation(FSCRT_ANNOT annot, FS_INT32 degree)
Set rotation in MK dictionary.
FS_RESULT FSPDF_Annot_SetAlignment(FSCRT_ANNOT annot, FS_INT32 alignment)
Set alignment of a free text annotation.
Structure for quad points, in float.
Definition: fs_base_r.h:2100
FS_RESULT FSPDF_Annot_SetBorder(FSCRT_ANNOT annot, const FSPDF_ANNOTBORDER *border)
Set border of an annotation.

Foxit Corporation