Definitions for access to PDF form.
Definitions and functions in this module are included in fpdf_form_r.h and fpdf_form_w.h.
Module: PDFForm
License Identifier: PDFForm/All
Available License Right: Reading/Writing
For License Right Reading, see fpdf_form_r.h.
For License Right Writing, see fpdf_form_w.h.
More...
Classes | |
struct | FSPDF_FORM |
Handle type to PDF form. More... | |
struct | FSPDF_FORMCONTROL |
Handle type to PDF form control (widget). More... | |
struct | FSPDF_CHOICEOPTION |
Structure for list box and combo box option only. More... | |
struct | FSPDF_FORMFILLER |
Handle type to PDF form filler. More... | |
struct | FSPDF_FORMINTERACTION_WINDOWLESS |
Structure for windowless form interaction information. More... | |
struct | FSPDF_JAVASCRIPTEVENT |
Structure for javascript event. More... | |
Functions | |
FS_RESULT | FSPDF_Doc_HasForm (FSCRT_DOCUMENT document, FS_BOOL *hasForm) |
Check if the document has a Acro form. More... | |
FS_RESULT | FSPDF_Form_Load (FSCRT_DOCUMENT pdfDoc, FSPDF_FORM *form) |
Retrieve a form handle for a specific document. More... | |
FS_RESULT | FSPDF_Form_Release (FSPDF_FORM form) |
Release a PDF interactive form object. More... | |
FS_RESULT | FSPDF_Form_GetDocument (FSPDF_FORM form, FSCRT_DOCUMENT *document) |
Retrieve a PDF document which owns the form. More... | |
FS_RESULT | FSPDF_Form_CountFields (FSPDF_FORM form, const FSCRT_BSTR *filter, FS_INT32 *count) |
Get count of fields satisfying a name filter in a form. More... | |
FS_RESULT | FSPDF_Form_GetField (FSPDF_FORM form, const FSCRT_BSTR *filter, FS_INT32 index, FSCRT_BSTR *fieldName, FS_INT32 *fieldType) |
Search and retrieve the name and type of a field satisfying a name filter in a form. More... | |
FS_RESULT | FSPDF_Form_GetControlAtPos (FSPDF_FORM form, FSCRT_PAGE page, FS_FLOAT x, FS_FLOAT y, FS_FLOAT tolerance, FS_INT32 typeFilter, FSPDF_FORMCONTROL *formControl) |
Search for form control at a specific position in a form. More... | |
FS_RESULT | FSPDF_Form_GetControlAtDevicePos (FSPDF_FORM form, FSCRT_PAGE page, const FSCRT_MATRIX *matrix, FS_INT32 x, FS_INT32 y, FS_FLOAT tolerance, FS_INT32 typeFilter, FSPDF_FORMCONTROL *formControl) |
Search for form control which locates at a specific device position in a form. More... | |
FS_RESULT | FSPDF_Form_GetDefaultAppearance (FSPDF_FORM form, FSPDF_DEFAULTAPPEARANCE *defAppearance) |
Retrieve a default appearance of form. More... | |
FS_RESULT | FSPDF_Form_GetAlignment (FSPDF_FORM form, FS_INT32 *alignment) |
Retrieve alignment property of a form. More... | |
FS_RESULT | FSPDF_Form_NeedConstructAppearances (FSPDF_FORM form, FS_BOOL *needConstruct) |
Retrieve a boolean value whether or not to construct appearance property of a form. More... | |
FS_RESULT | FSPDF_Form_ValidateFieldName (FSPDF_FORM form, const FSCRT_BSTR *newFieldName, FS_INT32 fieldType, FS_BOOL *validate) |
Check if a name is valid for specified type of field in a form. More... | |
FS_RESULT | FSPDF_Form_GetFieldsInCalculationOrder (FSPDF_FORM form, FSCRT_BSTR *fieldNames, FS_DWORD *count) |
Get fields in a form in calculation order. More... | |
FS_RESULT | FSPDF_FormField_CountActions (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FS_INT32 trigger, FS_INT32 *count) |
Retrieve count of actions associated with a field and a trigger type in a form. More... | |
FS_RESULT | FSPDF_FormField_GetAction (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FS_INT32 trigger, FS_INT32 index, FSPDF_ACTIONDATA *actionData) |
Retrieve action associated with a field and a trigger type at a specified index in a form. More... | |
FS_RESULT | FSPDF_ChoiceOption_Init (FSPDF_CHOICEOPTION *options) |
Helper function to initialize options. More... | |
FS_RESULT | FSPDF_ChoiceOption_Clear (FSPDF_CHOICEOPTION *options) |
Helper function to clear options. More... | |
FS_RESULT | FSPDF_FormField_GetAlignment (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FS_INT32 *alignment) |
Get alignment type of a field's text. More... | |
FS_RESULT | FSPDF_FormField_GetFlags (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FS_DWORD *flags) |
Get flags specifying various characteristics of the field. More... | |
FS_RESULT | FSPDF_FormField_GetType (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FS_INT32 *fieldType) |
Get field type. More... | |
FS_RESULT | FSPDF_FormField_GetDefaultValue (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FSCRT_BSTR *value) |
Get default value of a field. More... | |
FS_RESULT | FSPDF_FormField_GetValue (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FSCRT_BSTR *value) |
Get value of a field. More... | |
FS_RESULT | FSPDF_FormField_CountControls (FSPDF_FORM form, FSCRT_PAGE page, const FSCRT_BSTR *fieldName, FS_INT32 *count) |
Get count of controls in a PDF page which belongs to specified fields. More... | |
FS_RESULT | FSPDF_FormField_GetControl (FSPDF_FORM form, FSCRT_PAGE page, const FSCRT_BSTR *fieldName, FS_INT32 index, FSPDF_FORMCONTROL *formControl) |
Get a form control which belongs to the specified fields. More... | |
FS_RESULT | FSPDF_FormField_GetControlIndex (FSPDF_FORM form, const FSPDF_FORMCONTROL formControl, FS_INT32 *index) |
Get index of the form control which belongs to the specified fields. More... | |
FS_RESULT | FSPDF_FormField_GetDefaultAppearance (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FSPDF_DEFAULTAPPEARANCE *defAppearance) |
Get default appearance of specified fields. More... | |
FS_RESULT | FSPDF_FormField_GetAlternateName (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FSCRT_BSTR *alternateName) |
Get alternate name to be used in place of actual field name. More... | |
FS_RESULT | FSPDF_FormField_GetMappingName (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FSCRT_BSTR *mappingName) |
Get mapping name to be used when exporting interactive form field data from the document. More... | |
FS_RESULT | FSPDF_FormField_GetMaxLen (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FS_INT32 *maxLen) |
Get maximum length of the field's text, in characters. More... | |
FS_RESULT | FSPDF_FormField_GetOptions (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FSPDF_CHOICEOPTION *options, FS_INT32 *count) |
Get list box or combo box options. More... | |
FS_RESULT | FSPDF_FormField_GetTopVisibleIndex (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FS_INT32 *index) |
Get top index for scrollable list boxes. More... | |
FS_RESULT | FSPDF_FormControl_GetWidgetAnnot (FSPDF_FORMCONTROL formControl, FSCRT_ANNOT *widgetAnnot) |
Get widget annotation from form control handle. More... | |
FS_RESULT | FSPDF_FormControl_GetFieldName (FSPDF_FORMCONTROL formControl, FSCRT_BSTR *fieldName) |
Get field name from form control handle. More... | |
FS_RESULT | FSPDF_FormControl_GetExportValue (FSPDF_FORMCONTROL formControl, FSCRT_BSTR *exportValue) |
Get option's export value. More... | |
FS_RESULT | FSPDF_FormControl_IsChecked (FSPDF_FORMCONTROL formControl, FS_BOOL *checked) |
Get check box or radio button's state. More... | |
FS_RESULT | FSPDF_FormControl_IsDefaultChecked (FSPDF_FORMCONTROL formControl, FS_BOOL *checked) |
Get check box or radio button's default state. More... | |
FS_RESULT | FSPDF_RenderContext_StartFormControls (FSPDF_RENDERCONTEXT pdfRenderContext, FSCRT_RENDERER renderer, const FSPDF_FORMCONTROL *formControls, FS_INT32 count, FSCRT_PROGRESS *renderProgress) |
Start rendering a PDF form control in a renderer with a PDF rendering context. More... | |
FS_RESULT | FSPDF_RenderContext_StartPageFormControls (FSPDF_RENDERCONTEXT pdfRenderContext, FSCRT_RENDERER renderer, FSCRT_PAGE page, FSCRT_PROGRESS *renderProgress) |
Start rendering a page's form controls in a renderer with a PDF rendering context. More... | |
FS_RESULT | FSPDF_Doc_CreateForm (FSCRT_DOCUMENT document, FSPDF_FORM *form) |
Create an arco form. More... | |
FS_RESULT | FSPDF_Form_ExportToFDFDoc (FSPDF_FORM form, FSCRT_DOCUMENT fdfDoc) |
Export data in a form to a FDF document. More... | |
FS_RESULT | FSPDF_Form_ImportFromFDFDoc (FSPDF_FORM form, FSCRT_DOCUMENT fdfDoc) |
Import data in FDF document to fill a form. More... | |
FS_RESULT | FSPDF_Form_ExportToXML (FSPDF_FORM form, FSCRT_FILE xmlFile) |
Export the form data to a XML file. More... | |
FS_RESULT | FSPDF_Form_ImportFromXML (FSPDF_FORM form, FSCRT_FILE xmlFile) |
Import the form data from a XML file. More... | |
FS_RESULT | FSPDF_Form_Reset (FSPDF_FORM form, const FSCRT_BSTR *fieldNames, FS_INT32 count, FS_BOOL bInclude) |
Reset data in fields to their default value. More... | |
FS_RESULT | FSPDF_Form_SetDefaultAppearance (FSPDF_FORM form, const FSPDF_DEFAULTAPPEARANCE *defAppearance) |
Set default appearance of a form. More... | |
FS_RESULT | FSPDF_Form_SetAlignment (FSPDF_FORM form, FS_INT32 alignment) |
Set alignment property of a form, as a document-wide default value. More... | |
FS_RESULT | FSPDF_Form_SetConstructAppearancesFlag (FSPDF_FORM form, FS_BOOL needConstruct) |
Set a flag that specifies whether to construct appearances when loading form controls. More... | |
FS_RESULT | FSPDF_Form_RenameField (FSPDF_FORM form, const FSCRT_BSTR *fieldName, const FSCRT_BSTR *newFieldName) |
Rename a field to a new name. More... | |
FS_RESULT | FSPDF_Form_SetFieldsInCalculationOrder (FSPDF_FORM form, const FSCRT_BSTR *fieldNames, FS_DWORD count) |
Set calculation order in a form. More... | |
FS_RESULT | FSPDF_Form_AddField (FSPDF_FORM form, FSCRT_PAGE page, const FSCRT_BSTR *fieldName, FS_INT32 fieldType, FSCRT_RECTF *rect, FSPDF_FORMCONTROL *formControl) |
Add a form field to arco form, and also create a new form control with the field. More... | |
FS_RESULT | FSPDF_Form_RemoveField (FSPDF_FORM form, const FSCRT_BSTR *fieldName) |
Remove a form field from arco form. More... | |
FS_RESULT | FSPDF_FormFiller_Begin (FSPDF_FORM form, FSPDF_FORMINTERACTION_WINDOWLESS *windowless, FSPDF_FORMFILLER *filler) |
Begin the form filling. More... | |
FS_RESULT | FSPDF_FormFiller_TriggerWindowlessEvent (FSPDF_FORMFILLER filler, FSCRT_PAGE page, FSCRT_MATRIX *page2Device, FS_DWORD eventType, FS_LPVOID eventData) |
Trigger the platform event for the windowless form filling. More... | |
FS_RESULT | FSPDF_FormFiller_SetHighlightColor (FSPDF_FORMFILLER filler, FS_INT32 fieldType, FS_ARGB color) |
Set the highlight color for the form field. More... | |
FS_RESULT | FSPDF_FormFiller_ShowHighlight (FSPDF_FORMFILLER filler, FS_BOOL show) |
Whether to show the highlight of form field or not. More... | |
FS_RESULT | FSPDF_FormFiller_End (FSPDF_FORMFILLER filler) |
Finish the form filling. More... | |
FS_RESULT | FSPDF_FormField_SetAction (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FS_INT32 trigger, FS_INT32 index, const FSPDF_ACTIONDATA *actionData) |
Update an action associated with a field (except signature field) and a trigger type at a specified index in a form. More... | |
FS_RESULT | FSPDF_FormField_InsertAction (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FS_INT32 trigger, FS_INT32 index, const FSPDF_ACTIONDATA *actionData) |
Insert an action associated with a field (except signature field) and a trigger type at a specified index in a form. More... | |
FS_RESULT | FSPDF_FormField_RemoveAction (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FS_INT32 trigger, FS_INT32 index) |
Remove an action associated with a field (except signature field) and a trigger type by index in a form. More... | |
FS_RESULT | FSPDF_FormField_RemoveAllActions (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FS_INT32 trigger) |
Remove all actions associated with a field (except signature field) and a trigger type in a form. More... | |
FS_RESULT | FSPDF_FormField_RemoveControl (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FSPDF_FORMCONTROL formControl) |
Remove a form control from a form field. More... | |
FS_RESULT | FSPDF_FormField_ValidateValue (FSPDF_FORM form, const FSCRT_BSTR *fieldName, const FSCRT_BSTR *value, FS_BOOL *isValid) |
Perform the form field javascript to validate whether the user input value is valid. More... | |
FS_RESULT | FSPDF_FormField_ValidateKeyStroke (FSPDF_FORM form, const FSCRT_BSTR *fieldName, const FSCRT_BSTR *value, FS_BOOL *isValid) |
Perform the form field javascript to validate whether the input of key stroke is valid. More... | |
FS_RESULT | FSPDF_FormField_ValidateKeyStrokeEvent (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FSPDF_JAVASCRIPTEVENT *jsEvent) |
Perform the form field javascript to validate whether the input of key stroke is valid. More... | |
FS_RESULT | FSPDF_FormField_Calculate (FSPDF_FORM form, const FSCRT_BSTR *fieldName) |
Perform the form field javascript to calculate the values of form fields. More... | |
FS_RESULT | FSPDF_FormField_Format (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FS_BOOL *isFormated) |
Perform the form field javascript to format the values of form fields. More... | |
FS_RESULT | FSPDF_FormField_SetAlignment (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FS_INT32 alignment) |
Set alignment property of the field's text, only useful for text field and list box. More... | |
FS_RESULT | FSPDF_FormField_SetFlags (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FS_DWORD flags) |
Set flags specifying various characteristics of the field (except signature field). More... | |
FS_RESULT | FSPDF_FormField_SetDefaultValue (FSPDF_FORM form, const FSCRT_BSTR *fieldName, const FSCRT_BSTR *value) |
Set default value of the field (except signature field). More... | |
FS_RESULT | FSPDF_FormField_SetValue (FSPDF_FORM form, const FSCRT_BSTR *fieldName, const FSCRT_BSTR *value) |
Set value of a field (except signature field). More... | |
FS_RESULT | FSPDF_FormField_SetDefaultAppearance (FSPDF_FORM form, const FSCRT_BSTR *fieldName, const FSPDF_DEFAULTAPPEARANCE *defAppearance) |
Set default appearance to the specified field (except signature field). More... | |
FS_RESULT | FSPDF_FormField_SetAlternateName (FSPDF_FORM form, const FSCRT_BSTR *fieldName, const FSCRT_BSTR *alternateName) |
Set alternate name to be used in place of the actual field (except signature field) name. More... | |
FS_RESULT | FSPDF_FormField_SetMappingName (FSPDF_FORM form, const FSCRT_BSTR *fieldName, const FSCRT_BSTR *mappingName) |
Set mapping name to be used when exporting interactive form field data from the document (except signature field). More... | |
FS_RESULT | FSPDF_FormField_SetMaxLen (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FS_INT32 maxLen) |
Set maximum length of the field's text (except signature field), in characters. More... | |
FS_RESULT | FSPDF_FormField_SetOptions (FSPDF_FORM form, const FSCRT_BSTR *fieldName, const FSPDF_CHOICEOPTION *options, FS_INT32 count) |
Set list box or combo box options. More... | |
FS_RESULT | FSPDF_FormField_SetTopVisibleIndex (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FS_INT32 index) |
Set top index for scrollable list boxes. More... | |
FS_RESULT | FSPDF_FormControl_SetExportValue (FSPDF_FORMCONTROL formControl, const FSCRT_BSTR *exportValue) |
Set option's export value. More... | |
FS_RESULT | FSPDF_FormControl_SetChecked (FSPDF_FORMCONTROL formControl, FS_BOOL checked) |
Set check box or radio button's state. More... | |
FS_RESULT | FSPDF_FormControl_SetDefaultChecked (FSPDF_FORMCONTROL formControl, FS_BOOL checked) |
Set check box or radio button's default state. More... | |
FS_RESULT | FSPDF_FormControl_DoJavaScriptAction (FSPDF_FORMCONTROL control, FS_INT32 trigger) |
Perform the form control javascript which is specified by the trigger. More... | |
FS_RESULT | FSPDF_FormField_ValidateValueEvent (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FSPDF_JAVASCRIPTEVENT *jsEvent) |
Perform the form field javascript to validate whether the user input value is valid. More... | |
FS_RESULT | FSPDF_FormField_FormatEvent (FSPDF_FORM form, const FSCRT_BSTR *fieldName, FSPDF_JAVASCRIPTEVENT *jsEvent) |
Perform the form field javascript to format the values of form fields. More... | |
Macro Definitions for Form Field Types. | |
#define | FSPDF_FORMFIELDTYPE_UNKNOWN 0 |
Unknown type. | |
#define | FSPDF_FORMFIELDTYPE_PUSHBUTTON 1 |
Push button type. | |
#define | FSPDF_FORMFIELDTYPE_CHECKBOX 2 |
Check box type. | |
#define | FSPDF_FORMFIELDTYPE_RADIOBUTTON 3 |
Radio button type. | |
#define | FSPDF_FORMFIELDTYPE_COMBOBOX 4 |
Combo box type. | |
#define | FSPDF_FORMFIELDTYPE_LISTBOX 5 |
List box type. | |
#define | FSPDF_FORMFIELDTYPE_TEXTFIELD 6 |
single line or multi-line texts. | |
#define | FSPDF_FORMFIELDTYPE_UNSPECIFIED FSPDF_FORMFIELDTYPE_UNKNOWN |
Unspecified type. | |
Macro Definitions for Form Field Flags. | |
#define | FSPDF_FORMFIELDFLAG_READONLY 0x001 |
The field is read only and no editing is allowed. | |
#define | FSPDF_FORMFIELDFLAG_REQUIRED 0x002 |
The field will be exported by a submit-form action. | |
#define | FSPDF_FORMFIELDFLAG_NOEXPORT 0x004 |
The field must not be exported by a submit-form action. | |
Macro Definitions for Radio Button Field Flags. | |
#define | FSPDF_FORMFIELDFLAG_BUTTON_NOTOGGLETOOF 0x100 |
Unable to turn this radio button off. More... | |
#define | FSPDF_FORMFIELDFLAG_BUTTON_RADIOSINUNISON 0x200 |
Put radio buttons with same value in unison. More... | |
Macro Definitions for Text Field Flags. | |
#define | FSPDF_FORMFIELDFLAG_TEXT_MULTILINE 0x100 |
Multiple lines. | |
#define | FSPDF_FORMFIELDFLAG_TEXT_PASSWORD 0x200 |
This is a password field. Password should not be displayed or exported. | |
#define | FSPDF_FORMFIELDFLAG_TEXT_DONOTSCROLL 0x400 |
Never show scroll bar. More... | |
#define | FSPDF_FORMFIELDFLAG_TEXT_COMB 0x800 |
Use combs. More... | |
Macro Definitions for Combo Box Field Flags. | |
#define | FSPDF_FORMFIELDFLAG_COMBO_EDIT 0x100 |
Combo box style. More... | |
Macro Definitions for List Box Field Flags. | |
#define | FSPDF_FORMFIELDFLAG_CHOICE_MULTISELECT 0x100 |
If set, more than one items can be selected. | |
Definitions for access to PDF form.
Definitions and functions in this module are included in fpdf_form_r.h and fpdf_form_w.h.
Module: PDFForm
License Identifier: PDFForm/All
Available License Right: Reading/Writing
For License Right Reading, see fpdf_form_r.h.
For License Right Writing, see fpdf_form_w.h.
This module contains following features:
#define FSPDF_FORMFIELDFLAG_BUTTON_NOTOGGLETOOF 0x100 |
Unable to turn this radio button off.
For radio button only: if set, one radio button has to be selected at any time; Otherwise, when the selected radio button is clicked, it will be turned off, (leaving no radio button selected at this time).
#define FSPDF_FORMFIELDFLAG_BUTTON_RADIOSINUNISON 0x200 |
Put radio buttons with same value in unison.
If set, radio buttons with same value in a field will be turned on or off in unison (either all one, or all off). If cleared, all buttons are mutually exclusive.
#define FSPDF_FORMFIELDFLAG_COMBO_EDIT 0x100 |
Combo box style.
If set, the combo box includes an editable text control, otherwise, it is only a drop list.
#define FSPDF_FORMFIELDFLAG_TEXT_COMB 0x800 |
Use combs.
If set, the field is automatically divided into as many equally spaced positions, or combs, as the value of maximum length of a field's text, and the text is laid out into those combs.
#define FSPDF_FORMFIELDFLAG_TEXT_DONOTSCROLL 0x400 |
Never show scroll bar.
Do not scroll (vertically for multiple-line fields, or horizontally for single-line fields). If the field is full, no further text is accepted.
FS_RESULT FSPDF_ChoiceOption_Clear | ( | FSPDF_CHOICEOPTION * | options | ) |
Helper function to clear options.
[in] | options | Pointer to a FSPDF_CHOICEOPTION structure which is for list box and combo box, |
FS_RESULT FSPDF_ChoiceOption_Init | ( | FSPDF_CHOICEOPTION * | options | ) |
Helper function to initialize options.
[in] | options | Pointer to a FSPDF_CHOICEOPTION structure which is for list box and combo box. |
FS_RESULT FSPDF_Doc_CreateForm | ( | FSCRT_DOCUMENT | document, |
FSPDF_FORM * | form | ||
) |
Create an arco form.
If a PDF document already has an arco form, this function will return the existed acro form object directly – same as function FSPDF_Form_Load.
[in] | document | Handle to a FSCRT_DOCUMENT object which is a PDF document object. It should be valid. |
[out] | form | Pointer to a FSPDF_FORM handle that receives a form object. |
Check if the document has a Acro form.
[in] | document | Handle to a FSCRT_DOCUMENT object which is a PDF document. |
[out] | hasForm | Pointer to a FS_BOOL object that receives the result. |
FS_RESULT FSPDF_Form_AddField | ( | FSPDF_FORM | form, |
FSCRT_PAGE | page, | ||
const FSCRT_BSTR * | fieldName, | ||
FS_INT32 | fieldType, | ||
FSCRT_RECTF * | rect, | ||
FSPDF_FORMCONTROL * | formControl | ||
) |
Add a form field to arco form, and also create a new form control with the field.
Application can use this function to add a form field to acro from, along with a new form control:
Whether a field exists or not will be judged with input parameter fieldName and fieldType.
[in] | form | Handle to a FSPDF_FORM object which is a document object. It should be valid. |
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page object. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which specifies the name of the form field which is to be added. It should be a UTF-8 string. |
[in] | fieldType | A FS_INT32 object which specifies the type of the form field which is to be added. Please refer to macro definitions FSPDF_FORMFIELDTYPE_XXX and this should be one of these macros except FSPDF_FORMFIELDTYPE_UNKNOWN and FSPDF_FORMFIELDTYPE_UNSPECIFIED. |
[in] | rect | Pointer to a FSCRT_RECTF structure which indicates the location to add a new form control for the form field, in PDF page coordinate system. |
[out] | formControl | Pointer to a FSPDF_FORMCONTROL handle that receives the newly created form control handle. It will be NULL if there is any error. |
FS_RESULT FSPDF_Form_CountFields | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | filter, | ||
FS_INT32 * | count | ||
) |
Get count of fields satisfying a name filter in a form.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[in] | filter | Pointer to a string which partially matches with the name of fields. It can be NULL. |
[out] | count | Pointer to a FS_INT32 object that receives the count of fields. |
FS_RESULT FSPDF_Form_ExportToFDFDoc | ( | FSPDF_FORM | form, |
FSCRT_DOCUMENT | fdfDoc | ||
) |
Export data in a form to a FDF document.
Currently, it can support traditional FDF and XFDF files format.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. It should be valid. |
[in] | fdfDoc | Handle to a FSCRT_DOCUMENT object which is a FDF document object. |
FS_RESULT FSPDF_Form_ExportToXML | ( | FSPDF_FORM | form, |
FSCRT_FILE | xmlFile | ||
) |
Export the form data to a XML file.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. It should be valid. |
[in] | xmlFile | Handle to a FSCRT_FILE object, to which form data is to be exported. |
Retrieve alignment property of a form.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[out] | alignment | Pointer to a FS_INT32 object to receive the alignment property. It would be one of the following macro definitions: |
FS_RESULT FSPDF_Form_GetControlAtDevicePos | ( | FSPDF_FORM | form, |
FSCRT_PAGE | page, | ||
const FSCRT_MATRIX * | matrix, | ||
FS_INT32 | x, | ||
FS_INT32 | y, | ||
FS_FLOAT | tolerance, | ||
FS_INT32 | typeFilter, | ||
FSPDF_FORMCONTROL * | formControl | ||
) |
Search for form control which locates at a specific device position in a form.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[in] | page | Handle to a FSPDF_PAGE object which is a PDF page object. |
[in] | matrix | Pointer to a FSCRT_MATRIX structure that specifies the transform matrix returned by function FSPDF_Page_GetMatrix. |
[in] | x | A FS_FLOAT which specifies the x-coordinate in device for the search position. |
[in] | y | A FS_FLOAT which specifies the y-coordinate in device for the search position. |
[in] | tolerance | A FS_FLOAT which specifies the offset tolerance of the search. |
[in] | typeFilter | A FS_INT32 to specify which type of form control to search. Please refer to macro definitions FSPDF_FORMFIELDTYPE_XXX and this should be one of these macros. If it is FSPDF_FORMFIELDTYPE_UNSPECIFIED, the first form control at the specific position in a page will be retrieved. |
[out] | formControl | Pointer to a FSPDF_FORMCONTROL handle that receives the handle to the control when the search is successful. |
FS_RESULT FSPDF_Form_GetControlAtPos | ( | FSPDF_FORM | form, |
FSCRT_PAGE | page, | ||
FS_FLOAT | x, | ||
FS_FLOAT | y, | ||
FS_FLOAT | tolerance, | ||
FS_INT32 | typeFilter, | ||
FSPDF_FORMCONTROL * | formControl | ||
) |
Search for form control at a specific position in a form.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[in] | page | Handle to a FSPDF_PAGE object which is a PDF page. |
[in] | x | A FS_FLOAT which is the x position in PDF page coordinate. |
[in] | y | A FS_FLOAT which is the y position in PDF page coordinate. |
[in] | tolerance | A FS_FLOAT which specifies the tolerance of the search. |
[in] | typeFilter | A FS_INT32 to specify which type of form control to search. Please refer to macro definitions FSPDF_FORMFIELDTYPE_XXX and this should be one of these macros. If it is FSPDF_FORMFIELDTYPE_UNSPECIFIED, the first form control at the specific position in a page will be retrieved. |
[out] | formControl | Pointer to a FSPDF_FORMCONTROL handle that receives a form control when the search is successful. |
FS_RESULT FSPDF_Form_GetDefaultAppearance | ( | FSPDF_FORM | form, |
FSPDF_DEFAULTAPPEARANCE * | defAppearance | ||
) |
Retrieve a default appearance of form.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[out] | defAppearance | Pointer to a FSPDF_DEFAULTAPPEARANCE structure that receives the default appearance. |
FS_RESULT FSPDF_Form_GetDocument | ( | FSPDF_FORM | form, |
FSCRT_DOCUMENT * | document | ||
) |
Retrieve a PDF document which owns the form.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[out] | document | Pointer to a FSCRT_DOCUMENT handle that receives a PDF document. |
FS_RESULT FSPDF_Form_GetField | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | filter, | ||
FS_INT32 | index, | ||
FSCRT_BSTR * | fieldName, | ||
FS_INT32 * | fieldType | ||
) |
Search and retrieve the name and type of a field satisfying a name filter in a form.
It will get a form field from all fields with specific index if filter is NULL.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[in] | filter | Pointer to a FSCRT_BSTR structure which partially matches the name of fields. It can be NULL. For example, text1 will match text1.0, text1.2.0, etc. but text1 will not match test10 or test11.1.. |
[in] | index | A FS_INT32 to specify which field to retrieve information in the filtered results. |
[out] | fieldName | Pointer to a FSCRT_BSTR structure that receives the name of the result field. |
[out] | fieldType | Pointer to a FS_INT32 object that receives the type of the result field. Please refer to macro definitions FSPDF_FORMFIELDTYPE_XXX and this would be one of these macros. |
FS_RESULT FSPDF_Form_GetFieldsInCalculationOrder | ( | FSPDF_FORM | form, |
FSCRT_BSTR * | fieldNames, | ||
FS_DWORD * | count | ||
) |
Get fields in a form in calculation order.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[out] | fieldNames | Pointer to a FSCRT_BSTR structure which is an array to hold field names in order. |
[in,out] | count | Pointer to a FS_DWORD object. When fieldNames is NULL, count will receive the actual field count in the calculation order. When fieldNames is not NULL, count represents the length of fieldNames and has to be no less than the actual field count in calculation. It will also receive the actual field count. |
FS_RESULT FSPDF_Form_ImportFromFDFDoc | ( | FSPDF_FORM | form, |
FSCRT_DOCUMENT | fdfDoc | ||
) |
Import data in FDF document to fill a form.
Currently, it can support traditional FDF and XFDF files format.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. It should be valid. |
[in] | fdfDoc | Handle to a FSCRT_DOCUMENT object which is a FDF document object. |
FS_RESULT FSPDF_Form_ImportFromXML | ( | FSPDF_FORM | form, |
FSCRT_FILE | xmlFile | ||
) |
Import the form data from a XML file.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. It should be valid. |
[in] | xmlFile | Handle to a FSCRT_FILE object, from which form data is to be imported. |
FS_RESULT FSPDF_Form_Load | ( | FSCRT_DOCUMENT | pdfDoc, |
FSPDF_FORM * | form | ||
) |
Retrieve a form handle for a specific document.
[in] | pdfDoc | Handle to a FSCRT_DOCUMENT object which is a PDF document. |
[out] | form | Pointer to a FSPDF_FORM handle that receives a form object. |
Retrieve a boolean value whether or not to construct appearance property of a form.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[out] | needConstruct | Pointer to a FS_BOOL object that specifies whether or not to construct appearances when load form controls. TRUE if need, FALSE if not. |
FS_RESULT FSPDF_Form_Release | ( | FSPDF_FORM | form | ) |
Release a PDF interactive form object.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
FS_RESULT FSPDF_Form_RemoveField | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName | ||
) |
Remove a form field from arco form.
If the form field appears on more than one PDF page, all representations will be removed.
[in] | form | Handle to a FSPDF_FORM object which is a document object. It should be valid. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which specifies the name of form field which is to be removed. It should be a UTF-8 string. |
FS_RESULT FSPDF_Form_RenameField | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
const FSCRT_BSTR * | newFieldName | ||
) |
Rename a field to a new name.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. It should be valid. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure that specifies the field to rename. |
[in] | newFieldName | Pointer to a FSCRT_BSTR structure that represents the name to check. |
FS_RESULT FSPDF_Form_Reset | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldNames, | ||
FS_INT32 | count, | ||
FS_BOOL | bInclude | ||
) |
Reset data in fields to their default value.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. It should be valid. |
[in] | fieldNames | Pointer to a FSCRT_BSTR structure array, whose elements are field names to include or exclude. |
[in] | count | Array length of parameter fieldNames. |
[in] | bInclude | A FS_BOOL that specifies whether to include the fields in the resetting. TRUE if include, FALSE if exclude. |
Set alignment property of a form, as a document-wide default value.
Alignment is a property of variable text. And it is only useful for text field and list box, which may contain variable text as their content.
If a specific text field or list box has its own alignment value, the document-wide default one will be ignored; otherwise, the document-wide default one will be used for the specific text field or list box.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. It should be valid. |
[in] | alignment | The new default alignment type of variable text. It should be one of the following macro definitions: |
Set a flag that specifies whether to construct appearances when loading form controls.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. It should be valid. |
[in] | needConstruct | A FS_BOOL that specifies whether to construct appearances when loading form controls. TRUE if need, FALSE if not. |
FS_RESULT FSPDF_Form_SetDefaultAppearance | ( | FSPDF_FORM | form, |
const FSPDF_DEFAULTAPPEARANCE * | defAppearance | ||
) |
Set default appearance of a form.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. It should be valid. |
[in] | defAppearance | Pointer to a FSPDF_DEFAULTAPPEARANCE structure to update the default appearance. |
FS_RESULT FSPDF_Form_SetFieldsInCalculationOrder | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldNames, | ||
FS_DWORD | count | ||
) |
Set calculation order in a form.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. It should be valid. |
[in] | fieldNames | Pointer to a FSCRT_BSTR structure which represents an array consisting of the field names to form a new calculation order. |
[in] | count | The length of fieldNames. |
FS_RESULT FSPDF_Form_ValidateFieldName | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | newFieldName, | ||
FS_INT32 | fieldType, | ||
FS_BOOL * | validate | ||
) |
Check if a name is valid for specified type of field in a form.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[in] | newFieldName | Pointer to a new field name string, it should be a valid pointer to FSCRT_BSTR which represents the name to check. |
[in] | fieldType | A FS_INT32 object which specifies a field type this name is intended for. Please refer to macro definitions FSPDF_FORMFIELDTYPE_XXX and this should be one of these macros. |
[out] | validate | Pointer to a FS_BOOL object that receives the result of the check. |
Perform the form control javascript which is specified by the trigger.
[in] | control | Handle to a FSPDF_FORMCONTROL object which is a form control object. It should be valid. |
[in] | trigger | Type of the trigger event. Please refer to macro definitions FSPDF_TRIGGER_ANNOT_XXX and it should be one of these macro definitions. |
FS_RESULT FSPDF_FormControl_GetExportValue | ( | FSPDF_FORMCONTROL | formControl, |
FSCRT_BSTR * | exportValue | ||
) |
Get option's export value.
Applicable for CheckBox and RadioButton fields
[in] | formControl | Handle to a FSPDF_FORMCONTROL object which is a PDF form control. |
[out] | exportValue | Pointer to a FSCRT_BSTR structure that receives the option's export value. |
FS_RESULT FSPDF_FormControl_GetFieldName | ( | FSPDF_FORMCONTROL | formControl, |
FSCRT_BSTR * | fieldName | ||
) |
Get field name from form control handle.
[in] | formControl | Handle to a FSPDF_FORMCONTROL object which is a PDF form control. |
[out] | fieldName | Pointer to a FSCRT_BSTR structure that receives field name. It should not be NULL. |
FS_RESULT FSPDF_FormControl_GetWidgetAnnot | ( | FSPDF_FORMCONTROL | formControl, |
FSCRT_ANNOT * | widgetAnnot | ||
) |
Get widget annotation from form control handle.
[in] | formControl | Handle to a FSPDF_FORMCONTROL object which is a PDF form control. |
[out] | widgetAnnot | Pointer to a FSCRT_ANNOT handle that receives widget annotation handle. |
Get check box or radio button's state.
Applicable for CheckBox and RadioButton fields.
[in] | formControl | Handle to a FSPDF_FORMCONTROL object which is a PDF form control. |
[out] | checked | Pointer to a FS_BOOL object that receives the check box or radio button's state. |
Get check box or radio button's default state.
Applicable for CheckBox and RadioButton fields.
[in] | formControl | Handle to a FSPDF_FORMCONTROL object which is a PDF form control. |
[out] | checked | Pointer to a FS_BOOL object that receives the check box or radio button's default state. |
Set check box or radio button's state.
Applicable for CheckBox & RadioButton fields
[in] | formControl | Handle to a FSPDF_FORMCONTROL object which is a PDF form control. It should be valid. |
[in] | checked | A FS_BOOL object that is the check box or radio button's state. |
Set check box or radio button's default state.
Applicable for CheckBox & RadioButton fields
[in] | formControl | Handle to a FSPDF_FORMCONTROL object which is a PDF form control. It should be valid. |
[in] | checked | A FS_BOOL object that is check box or radio button's default state. |
FS_RESULT FSPDF_FormControl_SetExportValue | ( | FSPDF_FORMCONTROL | formControl, |
const FSCRT_BSTR * | exportValue | ||
) |
Set option's export value.
Applicable for CheckBox and RadioButton fields
[in] | formControl | Handle to a FSPDF_FORMCONTROL object which is a PDF form control. It should be valid. |
[in] | exportValue | Pointer to a FSCRT_BSTR structure that sets the option's export value. |
FS_RESULT FSPDF_FormField_Calculate | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName | ||
) |
Perform the form field javascript to calculate the values of form fields.
[in] | form | Handle to a FSPDF_FORM object which is a document object. It should be valid. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which specifies the name of form field. |
FS_RESULT FSPDF_FormField_CountActions | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FS_INT32 | trigger, | ||
FS_INT32 * | count | ||
) |
Retrieve count of actions associated with a field and a trigger type in a form.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[in] | trigger | A FS_INT32 which represents a trigger type.It should be one of the following macro definitions: |
[out] | count | Pointer to a FS_INT32 object that receives the action count. |
FS_RESULT FSPDF_FormField_CountControls | ( | FSPDF_FORM | form, |
FSCRT_PAGE | page, | ||
const FSCRT_BSTR * | fieldName, | ||
FS_INT32 * | count | ||
) |
Get count of controls in a PDF page which belongs to specified fields.
[in] | form | Handle to a FSPDF_FORM object that is a PDF interactive form. |
[in] | page | Handle to a FSCRT_PAGE object that is a PDF page object. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents name of a field. If this is NULL or fieldName->str is NULL or fieldName->len is less than 1, it means to get all form controls count in the page. |
[out] | count | Pointer to a FS_INT32 object that receives count of controls. |
FS_RESULT FSPDF_FormField_Format | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FS_BOOL * | isFormated | ||
) |
Perform the form field javascript to format the values of form fields.
[in] | form | Handle to a FSPDF_FORM object which is a document object. It should be valid. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which specify the name of form field. |
[out] | isFormated | Pointer to FS_BOOL to receive the value indicating whether the value is formated. |
FS_RESULT FSPDF_FormField_FormatEvent | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FSPDF_JAVASCRIPTEVENT * | jsEvent | ||
) |
Perform the form field javascript to format the values of form fields.
[in] | form | Handle to a FSPDF_FORM object which is a document object. It should be valid. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which specify the name of form field. |
[in,out] | jsEvent | Pointer to a FSPDF_JAVASCRIPTEVENT structure which specify the params of this event. Only FSPDF_JAVASCRIPTEVENT::strValue is used for this event. |
FS_RESULT FSPDF_FormField_GetAction | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FS_INT32 | trigger, | ||
FS_INT32 | index, | ||
FSPDF_ACTIONDATA * | actionData | ||
) |
Retrieve action associated with a field and a trigger type at a specified index in a form.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[in] | trigger | A FS_INT32 which represents a trigger type. It should be one of the following macro definitions: |
[in] | index | A FS_INT32 which represents the index of the action. |
[out] | actionData | Pointer to a FSPDF_ACTIONDATA structure that receives action data associated with the action. |
FS_RESULT FSPDF_FormField_GetAlignment | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FS_INT32 * | alignment | ||
) |
Get alignment type of a field's text.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[out] | alignment | Pointer to a FS_INT32 object to save the alignment type of the field's text. It would be one of the following macro definitions: |
FS_RESULT FSPDF_FormField_GetAlternateName | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FSCRT_BSTR * | alternateName | ||
) |
Get alternate name to be used in place of actual field name.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[out] | alternateName | Pointer to a FSCRT_BSTR structure that receives alternate name. |
FS_RESULT FSPDF_FormField_GetControl | ( | FSPDF_FORM | form, |
FSCRT_PAGE | page, | ||
const FSCRT_BSTR * | fieldName, | ||
FS_INT32 | index, | ||
FSPDF_FORMCONTROL * | formControl | ||
) |
Get a form control which belongs to the specified fields.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page object. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents name of a field. If this is NULL or fieldName->str is NULL or fieldName->len is less than 1, it means to get all form controls count in the page. |
[in] | index | The zero-based index in the matched form controls. |
[out] | formControl | Pointer to a FSPDF_FORMCONTROL handle that receives the form control handle. |
FS_RESULT FSPDF_FormField_GetControlIndex | ( | FSPDF_FORM | form, |
const FSPDF_FORMCONTROL | formControl, | ||
FS_INT32 * | index | ||
) |
Get index of the form control which belongs to the specified fields.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[in] | formControl | Handle to a FSPDF_FORMCONTROL object that is a form control. |
[out] | index` | Pointer to a FS_INT32 object that receives zero-based index in the matched form controls. |
FS_RESULT FSPDF_FormField_GetDefaultAppearance | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FSPDF_DEFAULTAPPEARANCE * | defAppearance | ||
) |
Get default appearance of specified fields.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[out] | defAppearance | Pointer to a FSPDF_DEFAULTAPPEARANCE structure that receives the default appearance of the specified fields. |
FS_RESULT FSPDF_FormField_GetDefaultValue | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FSCRT_BSTR * | value | ||
) |
Get default value of a field.
Applicable for all fields except PushButton fields.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[out] | value | Pointer to a FSCRT_BSTR structure that receives default value of the field. |
FS_RESULT FSPDF_FormField_GetFlags | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FS_DWORD * | flags | ||
) |
Get flags specifying various characteristics of the field.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[out] | flags | Pointer to a FS_DWORD to save the flags of the field. Please refer to macro definitions FSPDF_FORMFIELDFLAG_XXX and this would be one or a combination of these macros. |
FS_RESULT FSPDF_FormField_GetMappingName | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FSCRT_BSTR * | mappingName | ||
) |
Get mapping name to be used when exporting interactive form field data from the document.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[out] | mappingName | Pointer to a FSCRT_BSTR structure which receives mapping name. |
FS_RESULT FSPDF_FormField_GetMaxLen | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FS_INT32 * | maxLen | ||
) |
Get maximum length of the field's text, in characters.
Applicable for Text fields.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[out] | maxLen | Pointer to a FS_INT32 object that receives the maximum length of the field's text. |
FS_RESULT FSPDF_FormField_GetOptions | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FSPDF_CHOICEOPTION * | options, | ||
FS_INT32 * | count | ||
) |
Get list box or combo box options.
Applicable for ListBox and ComboBox fields.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[out] | options | Pointer to a FSPDF_CHOICEOPTION structure array. |
[in,out] | count | Pointer to a FS_INT32 object that indicates the number of option array. When this function is called, count tells the number of option array, and when this function returns, count is the option's count stored in options. |
FS_RESULT FSPDF_FormField_GetTopVisibleIndex | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FS_INT32 * | index | ||
) |
Get top index for scrollable list boxes.
Applicable for ListBox fields. Parameter index is the index of first item which is in visible scope of list box.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[out] | index | Pointer to a FS_INT32 object that receives the index of the first visible item. |
FS_RESULT FSPDF_FormField_GetType | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FS_INT32 * | fieldType | ||
) |
Get field type.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[out] | fieldType | Pointer to a FS_INT32 object to save the type of the field. Please refer to macro definitions FSPDF_FORMFIELDTYPE_XXX and this would be one of these macros. |
FS_RESULT FSPDF_FormField_GetValue | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FSCRT_BSTR * | value | ||
) |
Get value of a field.
Applicable for all fields except PushButton fields.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[out] | value | Pointer to a FSCRT_BSTR structure that receives the value of the field. |
FS_RESULT FSPDF_FormField_InsertAction | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FS_INT32 | trigger, | ||
FS_INT32 | index, | ||
const FSPDF_ACTIONDATA * | actionData | ||
) |
Insert an action associated with a field (except signature field) and a trigger type at a specified index in a form.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. It should be valid. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[in] | trigger | A FS_INT32 which represents a trigger type. It should be one of the following macro definitions: |
[in] | index | A FS_INT32 which represents the index of the action. Range: 0 to (actioncount-1). actioncount is returned by function FSPDF_FormField_CountActions. If it is out of the range, parameter actionData will be inserted to the last. |
[in] | actionData | Pointer to a FSPDF_ACTIONDATA structure that receives the action data that associated with the action. |
FS_RESULT FSPDF_FormField_RemoveAction | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FS_INT32 | trigger, | ||
FS_INT32 | index | ||
) |
Remove an action associated with a field (except signature field) and a trigger type by index in a form.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. It should be valid. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[in] | trigger | A FS_INT32 which represents a trigger type.It should be one of the following macro definitions: |
[in] | index | A FS_INT32 which represents the index of the action. |
FS_RESULT FSPDF_FormField_RemoveAllActions | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FS_INT32 | trigger | ||
) |
Remove all actions associated with a field (except signature field) and a trigger type in a form.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. It should be valid. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[in] | trigger | A FS_INT32 which represents a trigger type. It should be one of the following macro definitions: |
FS_RESULT FSPDF_FormField_RemoveControl | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FSPDF_FORMCONTROL | formControl | ||
) |
Remove a form control from a form field.
If the form field has only one control, the field itself will be removed at the same time.
[in] | form | Handle to a FSPDF_FORM object which is a document object. It should be valid. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which specify the name of the form field. |
[in] | formControl | Handle to a FSPDF_FORMCONTROL object which is to be removed. |
FS_RESULT FSPDF_FormField_SetAction | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FS_INT32 | trigger, | ||
FS_INT32 | index, | ||
const FSPDF_ACTIONDATA * | actionData | ||
) |
Update an action associated with a field (except signature field) and a trigger type at a specified index in a form.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. It should be valid. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[in] | trigger | A FS_INT32 which represents a trigger type. It should be one of the following macro definitions: |
[in] | index | A FS_INT32 which represents the index of the action. |
[in] | actionData | Pointer to a FSPDF_ACTIONDATA structure that is associated with the action. |
FS_RESULT FSPDF_FormField_SetAlignment | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FS_INT32 | alignment | ||
) |
Set alignment property of the field's text, only useful for text field and list box.
Alignment is a property of variable text. It can be set to any kind of form field, but only useful for text field and list box, which may contain variable text as their content.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. It should be valid. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[in] | alignment | The new alignment type of the field's variable text. It should be one of the following macro definitions: |
FS_RESULT FSPDF_FormField_SetAlternateName | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
const FSCRT_BSTR * | alternateName | ||
) |
Set alternate name to be used in place of the actual field (except signature field) name.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. It should be valid. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[in] | alternateName | Pointer to a FSCRT_BSTR structure which specifies alternate name. |
FS_RESULT FSPDF_FormField_SetDefaultAppearance | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
const FSPDF_DEFAULTAPPEARANCE * | defAppearance | ||
) |
Set default appearance to the specified field (except signature field).
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. It should be valid. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[in] | defAppearance | Pointer to a FSPDF_DEFAULTAPPEARANCE structure that receives the default appearance of the specified fields. |
FS_RESULT FSPDF_FormField_SetDefaultValue | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
const FSCRT_BSTR * | value | ||
) |
Set default value of the field (except signature field).
Applicable for all fields except PushButton fields.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. It should be valid. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[in] | value | Pointer to a FSCRT_BSTR structure that sets the default value of the field. |
FS_RESULT FSPDF_FormField_SetFlags | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FS_DWORD | flags | ||
) |
Set flags specifying various characteristics of the field (except signature field).
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. It should be valid. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[in] | flags | The flags of the field. Please refer to macro definitions FSPDF_FORMFIELDFLAG_XXX and this can be one or a combination of these macros. |
FS_RESULT FSPDF_FormField_SetMappingName | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
const FSCRT_BSTR * | mappingName | ||
) |
Set mapping name to be used when exporting interactive form field data from the document (except signature field).
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. It should be valid. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[in] | mappingName | Pointer to a FSCRT_BSTR structure which specifies mapping name. |
FS_RESULT FSPDF_FormField_SetMaxLen | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FS_INT32 | maxLen | ||
) |
Set maximum length of the field's text (except signature field), in characters.
Applicable for Text fields.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. It should be valid. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[in] | maxLen | The maximum length of the field's text. |
FS_RESULT FSPDF_FormField_SetOptions | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
const FSPDF_CHOICEOPTION * | options, | ||
FS_INT32 | count | ||
) |
Set list box or combo box options.
Applicable for ComboBox & ListBox fields
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. It should be valid. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[in] | options | Pointer to a FSPDF_CHOICEOPTION structure that is an array. |
[in] | count | The counts of input option. |
FS_RESULT FSPDF_FormField_SetTopVisibleIndex | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FS_INT32 | index | ||
) |
Set top index for scrollable list boxes.
Applicable for ListBox fields. Parameter index is the index of first item which is in visible scope of list box.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. It should be valid. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[in] | index | The first visible item's index to be set. |
FS_RESULT FSPDF_FormField_SetValue | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
const FSCRT_BSTR * | value | ||
) |
Set value of a field (except signature field).
Applicable for all fields except PushButton fields.
[in] | form | Handle to a FSPDF_FORM object which is a PDF interactive form. It should be valid. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which represents the name of a field. |
[in] | value | Pointer to a FSCRT_BSTR structure which receives the value of the field. |
FS_RESULT FSPDF_FormField_ValidateKeyStroke | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
const FSCRT_BSTR * | value, | ||
FS_BOOL * | isValid | ||
) |
Perform the form field javascript to validate whether the input of key stroke is valid.
[in] | form | Handle to a FSPDF_FORM object which is a document object. It should be valid. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which specifies the name of form field. |
[in] | value | Pointer to a FSCRT_BSTR structure which specifies the input value of form field. |
[out] | isValid | Pointer to FS_BOOL to receive the value indicating whether the input value is valid. |
FS_RESULT FSPDF_FormField_ValidateKeyStrokeEvent | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FSPDF_JAVASCRIPTEVENT * | jsEvent | ||
) |
Perform the form field javascript to validate whether the input of key stroke is valid.
[in] | form | Handle to a FSPDF_FORM object which is a document object. It should be valid. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which specifies the name of form field. |
[in] | jsEvent | Pointer to a FSPDF_JAVASCRIPTEVENT structure which specifies the current event of form field. |
FS_RESULT FSPDF_FormField_ValidateValue | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
const FSCRT_BSTR * | value, | ||
FS_BOOL * | isValid | ||
) |
Perform the form field javascript to validate whether the user input value is valid.
[in] | form | Handle to a FSPDF_FORM object which is a document object. It should be valid. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which specify the name of form field. |
[in] | value | Pointer to a FSCRT_BSTR structure which specify the input value of form field. |
[out] | isValid | Pointer to FS_BOOL to receive the value indicating whether the input value is valid. |
FS_RESULT FSPDF_FormField_ValidateValueEvent | ( | FSPDF_FORM | form, |
const FSCRT_BSTR * | fieldName, | ||
FSPDF_JAVASCRIPTEVENT * | jsEvent | ||
) |
Perform the form field javascript to validate whether the user input value is valid.
[in] | form | Handle to a FSPDF_FORM object which is a document object. It should be valid. |
[in] | fieldName | Pointer to a FSCRT_BSTR structure which specify the name of form field. |
[in,out] | jsEvent | Pointer to a FSPDF_JAVASCRIPTEVENT structure which specify the params of this event. For this event, the member strValue of structure FSPDF_JAVASCRIPTEVENT should be valid. |
FS_RESULT FSPDF_FormFiller_Begin | ( | FSPDF_FORM | form, |
FSPDF_FORMINTERACTION_WINDOWLESS * | windowless, | ||
FSPDF_FORMFILLER * | filler | ||
) |
Begin the form filling.
Function FSPDF_Doc_SetJavaScriptActionHandler should be called to set the action handler before starting the form filling, otherwise some action types, like javascript, could not perform well.
[in] | form | Handle to a FSPDF_FORM object which is a PDF form object. |
[in] | windowless | Pointer to a FPDF_FORMINTERACTION_WINDOWLESS structure which includes the callback functions for windowless form filling. |
[out] | filler | Pointer to a FSPDF_FORMFILLER handle to receive the form filler handle. |
FS_RESULT FSPDF_FormFiller_End | ( | FSPDF_FORMFILLER | filler | ) |
Finish the form filling.
[in] | filler | Handle to a FSPDF_FORMFILLER object which is a filler object. It should be valid. |
FS_RESULT FSPDF_FormFiller_SetHighlightColor | ( | FSPDF_FORMFILLER | filler, |
FS_INT32 | fieldType, | ||
FS_ARGB | color | ||
) |
Set the highlight color for the form field.
[in] | filler | Handle to a FSPDF_FORMFILLER object which is a filler object. It should be valid. |
[in] | fieldType | The form field type, please refer to macro definitions FSPDF_FORMFIELDTYPE_XXX. |
[in] | color | The color value in ARGB format. |
Whether to show the highlight of form field or not.
[in] | filler | Handle to a FSPDF_FORMFILLER object which is a filler object. It should be valid. |
[in] | show | Whether to highlight the form field or not. |
FS_RESULT FSPDF_FormFiller_TriggerWindowlessEvent | ( | FSPDF_FORMFILLER | filler, |
FSCRT_PAGE | page, | ||
FSCRT_MATRIX * | page2Device, | ||
FS_DWORD | eventType, | ||
FS_LPVOID | eventData | ||
) |
Trigger the platform event for the windowless form filling.
[in] | filler | Handle to a FSPDF_FORMFILLER object which is a filler object. It should be valid. |
[in] | page | Handle to a valid FSCRT_PAGE object. It could be NULL for some event type like FSCRT_EVENT_KEYDOWN,FSCRT_EVENT_KEYUP,FSCRT_EVENT_CHAR, FSCRT_EVENT_KILLFOCUS. |
[in] | page2Device | Pointer to a FSCRT_MATRIX structure. , which specifies the matrix transformation from page to device coordinate. It could be NULL for some event type like FSCRT_EVENT_KEYDOWN,FSCRT_EVENT_KEYUP,FSCRT_EVENT_CHAR, FSCRT_EVENT_KILLFOCUS. |
[in] | eventType | The type of the event. Please refer to macro definitions FSCRT_EVENT_XXX and this should be one of these macros. |
[in] | eventData | The event data, related to parameter eventType. Please refer to structures FSCRT_NOTEDATA_XXX and this should be one of these structure objects. |
FS_RESULT FSPDF_RenderContext_StartFormControls | ( | FSPDF_RENDERCONTEXT | pdfRenderContext, |
FSCRT_RENDERER | renderer, | ||
const FSPDF_FORMCONTROL * | formControls, | ||
FS_INT32 | count, | ||
FSCRT_PROGRESS * | renderProgress | ||
) |
Start rendering a PDF form control in a renderer with a PDF rendering context.
It will spend a long time to render a form control with complex or large contents, so Foxit PDF SDK uses a progressive process to do this.
Caller should pass renderProgress to FSCRT_Progress_Continue to continue rendering in steps, and should call function FSCRT_Progress_Release to destroy renderProgress object if rendering process is over.
[in] | pdfRenderContext | Handle to a FSPDF_RENDERCONTEXT object which is a PDF rendering context, created by function FSPDF_RenderContext_Create. |
[in] | renderer | Handle to a FSCRT_RENDERER object which represents a rendering engine, createcd by function FSCRT_Renderer_CreateOnBitmap or platform-dependednt renderer creating functions. |
[in] | formControls | Pointer to a FSPDF_FORMCONTROL array handle which is a PDF form control object. |
[in] | count | A FS_INT32 object that is the number of element in the formControls array. |
[out] | renderProgress | Pointer to a FSCRT_PROGRESS handle that receives a handle of progressive process. |
FS_RESULT FSPDF_RenderContext_StartPageFormControls | ( | FSPDF_RENDERCONTEXT | pdfRenderContext, |
FSCRT_RENDERER | renderer, | ||
FSCRT_PAGE | page, | ||
FSCRT_PROGRESS * | renderProgress | ||
) |
Start rendering a page's form controls in a renderer with a PDF rendering context.
It will take a long time to render all form controls in a page with complex or large contents, so Foxit PDF SDK uses a progressive process to do this.
Caller should pass renderProgress to FSCRT_Progress_Continue to continue rendering in steps, and should call function FSCRT_Progress_Release to destroy renderProgress object if rendering process is over.
[in] | pdfRenderContext | Handle to a FSPDF_RENDERCONTEXT object which is a PDF rendering context, created by function FSPDF_RenderContext_Create. |
[in] | renderer | Handle to a FSCRT_RENDERER object which represents a rendering engine, created by function FSCRT_Renderer_CreateOnBitmap or platform-dependednt renderer creating functions. |
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. |
[out] | renderProgress | Pointer to a FSCRT_PROGRESS handle that receives a handle of progressive process. |