PDF Form

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.
 

Detailed Description

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:

Macro Definition Documentation

#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.

Function Documentation

FS_RESULT FSPDF_ChoiceOption_Clear ( FSPDF_CHOICEOPTION options)

Helper function to clear options.

Parameters
[in]optionsPointer to a FSPDF_CHOICEOPTION structure which is for list box and combo box,
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter options is NULL.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
This helper function is used to clear options.
It frees FSPDF_CHOICEOPTION::optionValue and FSPDF_CHOICEOPTION::optionLabel and set them to be NULL pointer.
Application can free a FSPDF_CHOICEOPTION as another way instead of calling this function.
Attention
Thread Safety: this function is not thread safe, do not call it to process same objects between multi-threads, or application should maintain thread safety when need process same objects under multi-threaded environments.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_ChoiceOption_Init ( FSPDF_CHOICEOPTION options)

Helper function to initialize options.

Parameters
[in]optionsPointer to a FSPDF_CHOICEOPTION structure which is for list box and combo box.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter options is NULL.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
This helper function is used to initialize options.
It sets FSPDF_CHOICEOPTION::optionValue and FSPDF_CHOICEOPTION::optionLabel empty, and sets FSPDF_CHOICEOPTION::selected and FSPDF_CHOICEOPTION::defaultSelected FALSE
. Application can initialize a FSPDF_CHOICEOPTION as another way instead of calling this function.
Attention
Thread Safety: this function is not thread safe, do not call it to process the same object between multi-threads, or application should maintain thread safety when need process same objects under multi-threaded environment.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_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.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document object. It should be valid.
[out]formPointer to a FSPDF_FORM handle that receives a form object.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, or form is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or access to PDF form is not allowed.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a type of PDF document.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term recoverable.
  • document: this handle is long-term recoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Doc_HasForm ( FSCRT_DOCUMENT  document,
FS_BOOL hasForm 
)

Check if the document has a Acro form.

Parameters
[in]documentHandle to a FSCRT_DOCUMENT object which is a PDF document.
[out]hasFormPointer to a FS_BOOL object that receives the result.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter document, or hasForm is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or access to PDF form is not allowed.
FSCRT_ERRCODE_INVALIDTYPE if parameter document is not a type of PDF document.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term recoverable.
  • document: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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:

  • If the form field exists, a new form control will be created and set to the field.
  • If the form field does not exist, the field will be created according to parameter fieldName and fieldType and added to acro form, along with a newly created form control.

Whether a field exists or not will be judged with input parameter fieldName and fieldType.

Parameters
[in]formHandle to a FSPDF_FORM object which is a document object. It should be valid.
[in]pageHandle to a FSCRT_PAGE object which is a PDF page object.
[in]fieldNamePointer 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]fieldTypeA 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]rectPointer 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]formControlPointer to a FSPDF_FORMCONTROL handle that receives the newly created form control handle. It will be NULL if there is any error.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or access to PDF form is not allowed.
FSCRT_ERRCODE_PARAM if parameter form is NULL, page is NULL, fieldName is invalid, rect is invalid, or formControl is NULL.
FSCRT_ERRCODE_UNSUPPORTED if parameter fieldType is unsupported.
FSCRT_ERRCODE_FORMAT if parameter fieldName is not in UTF-8 format.
FSCRT_ERRCODE_UNKNOWNSTATE if annotations of parameter page have not been loaded.
FSCRT_ERRCODE_CONFLICT if there exists a field with same name but in different type.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if some other error happen.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
  • page: this handle is long-term partially recoverable.
  • formControl: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Note
It will count all fields if parameter filter is NULL.
Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[in]filterPointer to a string which partially matches with the name of fields. It can be NULL.
[out]countPointer to a FS_INT32 object that receives the count of fields.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, or count is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form. It should be valid.
[in]fdfDocHandle to a FSCRT_DOCUMENT object which is a FDF document object.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form or fdfDoc is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter fdfDoc is not a type of FDF document.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or access to PDF form is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
  • fdfDoc: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Form_ExportToXML ( FSPDF_FORM  form,
FSCRT_FILE  xmlFile 
)

Export the form data to a XML file.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form. It should be valid.
[in]xmlFileHandle to a FSCRT_FILE object, to which form data is to be exported.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form or xmlFile is a NULL pointer.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or access to PDF form is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if failing to export a XML file because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term partially recoverable.
  • form: this handle is long-term partially recoverable.
  • xmlFile: this handle is long-term recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Form_GetAlignment ( FSPDF_FORM  form,
FS_INT32 alignment 
)

Retrieve alignment property of a form.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[out]alignmentPointer to a FS_INT32 object to receive the alignment property. It would be one of the following macro definitions:
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, or alignment is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[in]pageHandle to a FSPDF_PAGE object which is a PDF page object.
[in]matrixPointer to a FSCRT_MATRIX structure that specifies the transform matrix returned by function FSPDF_Page_GetMatrix.
[in]xA FS_FLOAT which specifies the x-coordinate in device for the search position.
[in]yA FS_FLOAT which specifies the y-coordinate in device for the search position.
[in]toleranceA FS_FLOAT which specifies the offset tolerance of the search.
[in]typeFilterA 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]formControlPointer to a FSPDF_FORMCONTROL handle that receives the handle to the control when the search is successful.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, page, matrix, or formControl is NULL, or typeFilter is invalid.
FSCRT_ERRCODE_INVALIDTYPE if parameter page is not a type of PDF page or form and page are different document objects.
FSCRT_ERRCODE_UNKNOWNSTATE if annotations in parameter page are not loaded.
FSCRT_ERRCODE_NOTFOUND if no form control is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • form: this handle is long-term partially recoverable.
  • page: this handle is long-term partially recoverable.
  • formControl: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[in]pageHandle to a FSPDF_PAGE object which is a PDF page.
[in]xA FS_FLOAT which is the x position in PDF page coordinate.
[in]yA FS_FLOAT which is the y position in PDF page coordinate.
[in]toleranceA FS_FLOAT which specifies the tolerance of the search.
[in]typeFilterA 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]formControlPointer to a FSPDF_FORMCONTROL handle that receives a form control when the search is successful.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, page or formControl, is NULL, or typeFilter is invalid.
FSCRT_ERRCODE_INVALIDTYPE if parameter page is not a PDF page or form and page are in different documents.
FSCRT_ERRCODE_UNKNOWNSTATE if annotations in parameter page are not loaded.
FSCRT_ERRCODE_NOTFOUND if no form control is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • form: this handle is long-term partially recoverable.
  • page: this handle is long-term partially recoverable.
  • formControl: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Form_GetDefaultAppearance ( FSPDF_FORM  form,
FSPDF_DEFAULTAPPEARANCE defAppearance 
)

Retrieve a default appearance of form.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[out]defAppearancePointer to a FSPDF_DEFAULTAPPEARANCE structure that receives the default appearance.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, or defAppearance is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Form_GetDocument ( FSPDF_FORM  form,
FSCRT_DOCUMENT *  document 
)

Retrieve a PDF document which owns the form.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[out]documentPointer to a FSCRT_DOCUMENT handle that receives a PDF document.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, or document is NULL.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term recoverable.
  • form: this handle is long-term partially recoverable.
  • document: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[in]filterPointer 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]indexA FS_INT32 to specify which field to retrieve information in the filtered results.
[out]fieldNamePointer to a FSCRT_BSTR structure that receives the name of the result field.
[out]fieldTypePointer 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.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, fieldName, or fieldType is NULL.
FSCRT_ERRCODE_NOTFOUND if parameter index is out of range.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Form_GetFieldsInCalculationOrder ( FSPDF_FORM  form,
FSCRT_BSTR fieldNames,
FS_DWORD count 
)

Get fields in a form in calculation order.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[out]fieldNamesPointer to a FSCRT_BSTR structure which is an array to hold field names in order.
[in,out]countPointer 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.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, or count is NULL.
FSCRT_ERRCODE_BUFFEROVERFLOW if parameter fieldNames is valid but count is smaller than required.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
Commonly, this function is called twice. First, pass NULL to fieldNames to retrieve necessary array size, call it again when fieldNames contains enough space. count should never be empty.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form. It should be valid.
[in]fdfDocHandle to a FSCRT_DOCUMENT object which is a FDF document object.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form or fdfDoc is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter fdfDoc is not a type of FDF document.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or access to PDF form is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
  • fdfDoc: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Form_ImportFromXML ( FSPDF_FORM  form,
FSCRT_FILE  xmlFile 
)

Import the form data from a XML file.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form. It should be valid.
[in]xmlFileHandle to a FSCRT_FILE object, from which form data is to be imported.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form or xmlFile is a NULL pointer.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or access to PDF form is not allowed.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if failing to import a XML file because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term partially recoverable.
  • form: this handle is long-term partially recoverable.
  • xmlFile: this handle is long-term recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Form_Load ( FSCRT_DOCUMENT  pdfDoc,
FSPDF_FORM *  form 
)

Retrieve a form handle for a specific document.

Parameters
[in]pdfDocHandle to a FSCRT_DOCUMENT object which is a PDF document.
[out]formPointer to a FSPDF_FORM handle that receives a form object.
Note
If annotations have been loaded before this function is called, functions in PDF Form module cannot work correctly.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter pdfDoc, or form is NULL.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or access to PDF form is not allowed.
FSCRT_ERRCODE_INVALIDTYPE if parameter pdfDoc is not a type of PDF document.
FSCRT_ERRCODE_NOTFOUND if there is no form in the document. FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term recoverable.
  • pdfDoc: this handle is long-term partially recoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[out]needConstructPointer to a FS_BOOL object that specifies whether or not to construct appearances when load form controls. TRUE if need, FALSE if not.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, or needConstruct is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Form_Release ( FSPDF_FORM  form)

Release a PDF interactive form object.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form is NULL.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is not thread safe. Do not call it to process same objects between multi-threads, or the application should maintain thread safety when it needs to process the same object under multi-threaded environment.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term recoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a document object. It should be valid.
[in]fieldNamePointer to a FSCRT_BSTR structure which specifies the name of form field which is to be removed. It should be a UTF-8 string.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or access to PDF form is not allowed.
FSCRT_ERRCODE_PARAM if parameter form is NULL, or fieldName is invalid.
FSCRT_ERRCODE_FORMAT if parameter fieldName is not in UTF-8 format.
FSCRT_ERRCODE_NOTFOUND if no field is found.
FSCRT_ERRCODE_ERROR if some other error happen.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
After a form field has been removed, indexes of other form fields will be changed.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Form_RenameField ( FSPDF_FORM  form,
const FSCRT_BSTR fieldName,
const FSCRT_BSTR newFieldName 
)

Rename a field to a new name.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form. It should be valid.
[in]fieldNamePointer to a FSCRT_BSTR structure that specifies the field to rename.
[in]newFieldNamePointer to a FSCRT_BSTR structure that represents the name to check.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form, fieldName or newFieldName is a NULL pointer, or fieldName or newFieldName is empty.
FSCRT_ERRCODE_NOTFOUND if no parameter fieldName is found.
FSCRT_ERRCODE_CONFLICT if parameter newFieldName is same with an existing form field and the type of existing form field is different from the one specified by fieldName.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
It will change the field's index to rename a form field.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form. It should be valid.
[in]fieldNamesPointer to a FSCRT_BSTR structure array, whose elements are field names to include or exclude.
[in]countArray length of parameter fieldNames.
[in]bIncludeA FS_BOOL that specifies whether to include the fields in the resetting. TRUE if include, FALSE if exclude.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form is a NULL pointer.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
If parameter fieldNames is NULL or count is invalid. The function will reset whole form according to parameter includeOrExclude value.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Form_SetAlignment ( FSPDF_FORM  form,
FS_INT32  alignment 
)

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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form. It should be valid.
[in]alignmentThe new default alignment type of variable text. It should be one of the following macro definitions:
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form is a NULL pointer.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Form_SetConstructAppearancesFlag ( FSPDF_FORM  form,
FS_BOOL  needConstruct 
)

Set a flag that specifies whether to construct appearances when loading form controls.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form. It should be valid.
[in]needConstructA FS_BOOL that specifies whether to construct appearances when loading form controls. TRUE if need, FALSE if not.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form is a NULL pointer.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Form_SetDefaultAppearance ( FSPDF_FORM  form,
const FSPDF_DEFAULTAPPEARANCE defAppearance 
)

Set default appearance of a form.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form. It should be valid.
[in]defAppearancePointer to a FSPDF_DEFAULTAPPEARANCE structure to update the default appearance.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form or defAppearance is a NULL pointer.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Form_SetFieldsInCalculationOrder ( FSPDF_FORM  form,
const FSCRT_BSTR fieldNames,
FS_DWORD  count 
)

Set calculation order in a form.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form. It should be valid.
[in]fieldNamesPointer to a FSCRT_BSTR structure which represents an array consisting of the field names to form a new calculation order.
[in]countThe length of fieldNames.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form or fieldNames is a NULL pointer.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[in]newFieldNamePointer to a new field name string, it should be a valid pointer to FSCRT_BSTR which represents the name to check.
[in]fieldTypeA 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]validatePointer to a FS_BOOL object that receives the result of the check.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, newFieldName, or validate is NULL, newFieldName is empty, or fieldType is invalid.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_FormControl_DoJavaScriptAction ( FSPDF_FORMCONTROL  control,
FS_INT32  trigger 
)

Perform the form control javascript which is specified by the trigger.

Parameters
[in]controlHandle to a FSPDF_FORMCONTROL object which is a form control object. It should be valid.
[in]triggerType of the trigger event. Please refer to macro definitions FSPDF_TRIGGER_ANNOT_XXX and it should be one of these macro definitions.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter control is a NULL pointer, or trigger is invalid.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
Parameter trigger should be one of preceding six macros of definitions FSPDF_TRIGGER_ANNOT_XXX. This function may fail with others.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • control: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_FormControl_GetExportValue ( FSPDF_FORMCONTROL  formControl,
FSCRT_BSTR exportValue 
)

Get option's export value.

Applicable for CheckBox and RadioButton fields

Parameters
[in]formControlHandle to a FSPDF_FORMCONTROL object which is a PDF form control.
[out]exportValuePointer to a FSCRT_BSTR structure that receives the option's export value.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter formControl, or exportValue is NULL.
FSCRT_ERRCODE_NOTFOUND if no export value is found.
FSCRT_ERRCODE_INVALIDTYPE if parameter formControl is not a type of check box or radio button.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • formControl: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_FormControl_GetFieldName ( FSPDF_FORMCONTROL  formControl,
FSCRT_BSTR fieldName 
)

Get field name from form control handle.

Parameters
[in]formControlHandle to a FSPDF_FORMCONTROL object which is a PDF form control.
[out]fieldNamePointer to a FSCRT_BSTR structure that receives field name. It should not be NULL.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter formControl, or fieldName is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • formControl: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_FormControl_GetWidgetAnnot ( FSPDF_FORMCONTROL  formControl,
FSCRT_ANNOT *  widgetAnnot 
)

Get widget annotation from form control handle.

Parameters
[in]formControlHandle to a FSPDF_FORMCONTROL object which is a PDF form control.
[out]widgetAnnotPointer to a FSCRT_ANNOT handle that receives widget annotation handle.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter formControl, or widgetAnnot is NULL.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • formControl: this handle is short-term.
  • widgetAnnot: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_FormControl_IsChecked ( FSPDF_FORMCONTROL  formControl,
FS_BOOL checked 
)

Get check box or radio button's state.

Applicable for CheckBox and RadioButton fields.

Parameters
[in]formControlHandle to a FSPDF_FORMCONTROL object which is a PDF form control.
[out]checkedPointer to a FS_BOOL object that receives the check box or radio button's state.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter formControl, or checked is NULL.
FSCRT_ERRCODE_INVALIDTYPE if parameter formControl is not a type of check box or radio button.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • formControl: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_FormControl_IsDefaultChecked ( FSPDF_FORMCONTROL  formControl,
FS_BOOL checked 
)

Get check box or radio button's default state.

Applicable for CheckBox and RadioButton fields.

Parameters
[in]formControlHandle to a FSPDF_FORMCONTROL object which is a PDF form control.
[out]checkedPointer to a FS_BOOL object that receives the check box or radio button's default state.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter formControl, or checked is NULL.
FSCRT_ERRCODE_INVALIDTYPE if parameter formControl is not a type of check box or radio button.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • formControl: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_FormControl_SetChecked ( FSPDF_FORMCONTROL  formControl,
FS_BOOL  checked 
)

Set check box or radio button's state.

Applicable for CheckBox & RadioButton fields

Parameters
[in]formControlHandle to a FSPDF_FORMCONTROL object which is a PDF form control. It should be valid.
[in]checkedA FS_BOOL object that is the check box or radio button's state.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter formControl is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter formControl is not a type of check box or radio button.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • formControl: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_FormControl_SetDefaultChecked ( FSPDF_FORMCONTROL  formControl,
FS_BOOL  checked 
)

Set check box or radio button's default state.

Applicable for CheckBox & RadioButton fields

Parameters
[in]formControlHandle to a FSPDF_FORMCONTROL object which is a PDF form control. It should be valid.
[in]checkedA FS_BOOL object that is check box or radio button's default state.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter formControl is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter formControl is not a type of check box or radio button.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • formControl: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_FormControl_SetExportValue ( FSPDF_FORMCONTROL  formControl,
const FSCRT_BSTR exportValue 
)

Set option's export value.

Applicable for CheckBox and RadioButton fields

Parameters
[in]formControlHandle to a FSPDF_FORMCONTROL object which is a PDF form control. It should be valid.
[in]exportValuePointer to a FSCRT_BSTR structure that sets the option's export value.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter formControl or exportValue is a NULL pointer.
FSCRT_ERRCODE_INVALIDTYPE if parameter formControl is not a type of check box or radio button.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • formControl: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_FormField_Calculate ( FSPDF_FORM  form,
const FSCRT_BSTR fieldName 
)

Perform the form field javascript to calculate the values of form fields.

Parameters
[in]formHandle to a FSPDF_FORM object which is a document object. It should be valid.
[in]fieldNamePointer to a FSCRT_BSTR structure which specifies the name of form field.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form is a NULL pointer, or fieldName is NULL.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[in]triggerA FS_INT32 which represents a trigger type.It should be one of the following macro definitions:
[out]countPointer to a FS_INT32 object that receives the action count.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, fieldName, or count is NULL, or fieldName is empty, or trigger is invalid.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object that is a PDF interactive form.
[in]pageHandle to a FSCRT_PAGE object that is a PDF page object.
[in]fieldNamePointer 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]countPointer to a FS_INT32 object that receives count of controls.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, page, or formControl is NULL.
FSCRT_ERRCODE_INVALIDTYPE if parameter page is not a type of PDF page or form and page are different document objects.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found.
FSCRT_ERRCODE_UNKNOWNSTATE if annotations in parameter page are not loaded.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • form: this handle is long-term partially recoverable.
  • page: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_FormField_Format ( FSPDF_FORM  form,
const FSCRT_BSTR fieldName,
FS_BOOL isFormated 
)

Perform the form field javascript to format the values of form fields.

Parameters
[in]formHandle to a FSPDF_FORM object which is a document object. It should be valid.
[in]fieldNamePointer to a FSCRT_BSTR structure which specify the name of form field.
[out]isFormatedPointer to FS_BOOL to receive the value indicating whether the value is formated.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form is a NULL pointer, or fieldName,formated is NULL.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a document object. It should be valid.
[in]fieldNamePointer to a FSCRT_BSTR structure which specify the name of form field.
[in,out]jsEventPointer to a FSPDF_JAVASCRIPTEVENT structure which specify the params of this event. Only FSPDF_JAVASCRIPTEVENT::strValue is used for this event.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form is a NULL pointer, or jsEvent is NULL.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[in]triggerA FS_INT32 which represents a trigger type. It should be one of the following macro definitions:
[in]indexA FS_INT32 which represents the index of the action.
[out]actionDataPointer to a FSPDF_ACTIONDATA structure that receives action data associated with the action.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, fieldName,or actionData is NULL, or fieldName is empty, or trigger is invalid.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found, index is out of range or no action is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_FormField_GetAlignment ( FSPDF_FORM  form,
const FSCRT_BSTR fieldName,
FS_INT32 alignment 
)

Get alignment type of a field's text.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[out]alignmentPointer to a FS_INT32 object to save the alignment type of the field's text. It would be one of the following macro definitions:
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, fieldName, or alignment is NULL, or fieldName is empty.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[out]alternateNamePointer to a FSCRT_BSTR structure that receives alternate name.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, fieldName, or alternateName is NULL, or fieldName is empty.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[in]pageHandle to a FSCRT_PAGE object which is a PDF page object.
[in]fieldNamePointer 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]indexThe zero-based index in the matched form controls.
[out]formControlPointer to a FSPDF_FORMCONTROL handle that receives the form control handle.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, page, or formControl is NULL.
FSCRT_ERRCODE_INVALIDTYPE if parameter page is not a PDF page or form and page are different document objects.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found, or index is out of range or no form control is found.
FSCRT_ERRCODE_UNKNOWNSTATE if annotations in parameter page are not loaded.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • form: this handle is long-term partially recoverable.
  • page: this handle is long-term partially recoverable.
  • formControl: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[in]formControlHandle 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.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, formControl, or index is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • form: this handle is long-term partially recoverable.
  • formControl: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_FormField_GetDefaultAppearance ( FSPDF_FORM  form,
const FSCRT_BSTR fieldName,
FSPDF_DEFAULTAPPEARANCE defAppearance 
)

Get default appearance of specified fields.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[out]defAppearancePointer to a FSPDF_DEFAULTAPPEARANCE structure that receives the default appearance of the specified fields.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, fieldName, or defAppearance is NULL, or fieldName is empty.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[out]valuePointer to a FSCRT_BSTR structure that receives default value of the field.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, fieldName, or value is NULL, or fieldName is empty.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_FormField_GetFlags ( FSPDF_FORM  form,
const FSCRT_BSTR fieldName,
FS_DWORD flags 
)

Get flags specifying various characteristics of the field.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[out]flagsPointer 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.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, fieldName, or flags is NULL, or fieldName is empty.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[out]mappingNamePointer to a FSCRT_BSTR structure which receives mapping name.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, fieldName, or mappingName is NULL, or fieldName is empty.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[out]maxLenPointer to a FS_INT32 object that receives the maximum length of the field's text.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, fieldName, or maxLen is NULL, or fieldName is empty.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[out]optionsPointer to a FSPDF_CHOICEOPTION structure array.
[in,out]countPointer 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.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, fieldName, or count is NULL, or fieldName is empty, or both options and count are NULL.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found, or no choice options are found.
FSCRT_ERRCODE_INVALIDTYPE if parameter field is not a type of list box or combo box.
FSCRT_ERRCODE_BUFFEROVERFLOW if parameter options is valid but count is smaller than required.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
Commonly, this function is called twice. First, pass NULL to options to retrieve necessary count.
Call it again when options contains enough space. count should never be empty.
Caller should prepare enough space before calling this function.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[out]indexPointer to a FS_INT32 object that receives the index of the first visible item.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form, fieldName or index is a NULL pointer, or fieldName is empty.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found, or no top visible choice option is found.
FSCRT_ERRCODE_INVALIDTYPE if parameter field is not a type of list box or combo box.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_FormField_GetType ( FSPDF_FORM  form,
const FSCRT_BSTR fieldName,
FS_INT32 fieldType 
)

Get field type.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[out]fieldTypePointer 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.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, fieldName, or fieldType is NULL, or fieldName is empty.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[out]valuePointer to a FSCRT_BSTR structure that receives the value of the field.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter form, fieldName, or value is NULL, or fieldName is empty.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form. It should be valid.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[in]triggerA FS_INT32 which represents a trigger type. It should be one of the following macro definitions:
[in]indexA 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]actionDataPointer to a FSPDF_ACTIONDATA structure that receives the action data that associated with the action.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form, fieldName or actionData is a NULL pointer, or fieldName is empty or trigger is invalid.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found, index is out of range or no action is found.
FSCRT_ERRCODE_UNSUPPORTED if parameter fieldName represents a signature field.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form. It should be valid.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[in]triggerA FS_INT32 which represents a trigger type.It should be one of the following macro definitions:
[in]indexA FS_INT32 which represents the index of the action.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form or fieldName is a NULL pointer, or fieldName is empty or trigger is invalid.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found, index is out of range or no action is found.
FSCRT_ERRCODE_UNSUPPORTED if parameter fieldName represents a signature field.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form. It should be valid.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[in]triggerA FS_INT32 which represents a trigger type. It should be one of the following macro definitions:
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form or fieldName is a NULL pointer, or fieldName is empty or trigger is invalid.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found or there is no trigger action.
FSCRT_ERRCODE_UNSUPPORTED if parameter fieldName represents a signature field.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a document object. It should be valid.
[in]fieldNamePointer to a FSCRT_BSTR structure which specify the name of the form field.
[in]formControlHandle to a FSPDF_FORMCONTROL object which is to be removed.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or access to PDF form is not allowed.
FSCRT_ERRCODE_PARAM if parameter form is NULL, fieldName is invalid, or formControl is NULL.
FSCRT_ERRCODE_NOTFOUND if no field or control is found.
FSCRT_ERRCODE_FORMAT if parameter fieldName is not in UTF-8 format.
FSCRT_ERRCODE_ERROR if some other error happen.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • form: this handle is long-term partially recoverable.
  • formControl: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form. It should be valid.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[in]triggerA FS_INT32 which represents a trigger type. It should be one of the following macro definitions:
[in]indexA FS_INT32 which represents the index of the action.
[in]actionDataPointer to a FSPDF_ACTIONDATA structure that is associated with the action.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form, fieldName or actionData is a NULL pointer, or fieldName is empty or trigger is invalid.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found, index is out of range or no action is found.
FSCRT_ERRCODE_UNSUPPORTED if parameter fieldName represents a signature field.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form. It should be valid.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[in]alignmentThe new alignment type of the field's variable text. It should be one of the following macro definitions:
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form or fieldName is a NULL pointer, or fieldName is empty.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found.
FSCRT_ERRCODE_UNSUPPORTED if parameter fieldName represents a signature field.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form. It should be valid.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[in]alternateNamePointer to a FSCRT_BSTR structure which specifies alternate name.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form, fieldName or alternateName is a NULL pointer, or fieldName is empty.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found.
FSCRT_ERRCODE_UNSUPPORTED if parameter fieldName represents a signature field.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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).

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form. It should be valid.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[in]defAppearancePointer to a FSPDF_DEFAULTAPPEARANCE structure that receives the default appearance of the specified fields.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form, fieldName or defAppearance is a NULL pointer, or fieldName is empty.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found.
FSCRT_ERRCODE_UNSUPPORTED if parameter fieldName represents a signature field.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
Currently, FSPDF_DEFAULTAPPEARANCE::textMatrix will not have any effect (even if FSPDF_DEFAULTAPPEARANCE::flags contains FSPDF_DEFAULTAPPEARANCE_TEXTMATRIX ), if the related widget annotation of specified field has "MK" dictionary.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form. It should be valid.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[in]valuePointer to a FSCRT_BSTR structure that sets the default value of the field.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form, fieldName or value is a NULL pointer, or fieldName is empty.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found.
FSCRT_ERRCODE_UNSUPPORTED if parameter fieldName represents a signature field.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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).

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form. It should be valid.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[in]flagsThe flags of the field. Please refer to macro definitions FSPDF_FORMFIELDFLAG_XXX and this can be one or a combination of these macros.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form or fieldName is a NULL pointer, or fieldName is empty.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found.
FSCRT_ERRCODE_UNSUPPORTED if parameter fieldName represents a signature field.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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).

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form. It should be valid.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[in]mappingNamePointer to a FSCRT_BSTR structure which specifies mapping name.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form, fieldName or mappingName is a NULL pointer, or fieldName is empty.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found.
FSCRT_ERRCODE_UNSUPPORTED if parameter fieldName represents a signature field.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form. It should be valid.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[in]maxLenThe maximum length of the field's text.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form or fieldName is a NULL pointer, or fieldName is empty.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found.
FSCRT_ERRCODE_UNSUPPORTED if parameter fieldName represents a signature field.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form. It should be valid.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[in]optionsPointer to a FSPDF_CHOICEOPTION structure that is an array.
[in]countThe counts of input option.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form, fieldName or options is a NULL pointer, or fieldName is empty, or count is invalid.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found.
FSCRT_ERRCODE_INVALIDTYPE if parameter field is not a type of list box or combo box.
FSCRT_ERRCODE_UNKNOWNSTATE if function fails to update the internal state.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form. It should be valid.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[in]indexThe first visible item's index to be set.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form or fieldName is a NULL pointer, or fieldName is empty.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found, or index is out of range or no top visible choice option is found.
FSCRT_ERRCODE_INVALIDTYPE if parameter field is not a type of list box.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF interactive form. It should be valid.
[in]fieldNamePointer to a FSCRT_BSTR structure which represents the name of a field.
[in]valuePointer to a FSCRT_BSTR structure which receives the value of the field.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form, fieldName or value is a NULL pointer, or fieldName is empty.
FSCRT_ERRCODE_NOTFOUND if no specified form field is found.
FSCRT_ERRCODE_UNSUPPORTED if parameter fieldName represents a signature field.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a document object. It should be valid.
[in]fieldNamePointer to a FSCRT_BSTR structure which specifies the name of form field.
[in]valuePointer to a FSCRT_BSTR structure which specifies the input value of form field.
[out]isValidPointer to FS_BOOL to receive the value indicating whether the input value is valid.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form is a NULL pointer, or fieldName,isValid is NULL.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a document object. It should be valid.
[in]fieldNamePointer to a FSCRT_BSTR structure which specifies the name of form field.
[in]jsEventPointer to a FSPDF_JAVASCRIPTEVENT structure which specifies the current event of form field.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if one of form,fieldName or isValid is NULL, or the range specified by jsEvent.nStart and jsEvent.nEnd is invalid.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a document object. It should be valid.
[in]fieldNamePointer to a FSCRT_BSTR structure which specify the name of form field.
[in]valuePointer to a FSCRT_BSTR structure which specify the input value of form field.
[out]isValidPointer to FS_BOOL to receive the value indicating whether the input value is valid.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form is a NULL pointer, or fieldName,isValid is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a document object. It should be valid.
[in]fieldNamePointer to a FSCRT_BSTR structure which specify the name of form field.
[in,out]jsEventPointer 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.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter form is a NULL pointer, or jsEvent is NULL.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • form: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]formHandle to a FSPDF_FORM object which is a PDF form object.
[in]windowlessPointer to a FPDF_FORMINTERACTION_WINDOWLESS structure which includes the callback functions for windowless form filling.
[out]fillerPointer to a FSPDF_FORMFILLER handle to receive the form filler handle.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term recoverable.
  • form: this handle is long-term partially recoverable.
  • filler: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_FormFiller_End ( FSPDF_FORMFILLER  filler)

Finish the form filling.

Parameters
[in]fillerHandle to a FSPDF_FORMFILLER object which is a filler object. It should be valid.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter filler is a NULL pointer, or fieldType is invalid.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term recoverable.
  • filler: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_FormFiller_SetHighlightColor ( FSPDF_FORMFILLER  filler,
FS_INT32  fieldType,
FS_ARGB  color 
)

Set the highlight color for the form field.

Parameters
[in]fillerHandle to a FSPDF_FORMFILLER object which is a filler object. It should be valid.
[in]fieldTypeThe form field type, please refer to macro definitions FSPDF_FORMFIELDTYPE_XXX.
[in]colorThe color value in ARGB format.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term recoverable.
  • filler: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_FormFiller_ShowHighlight ( FSPDF_FORMFILLER  filler,
FS_BOOL  show 
)

Whether to show the highlight of form field or not.

Parameters
[in]fillerHandle to a FSPDF_FORMFILLER object which is a filler object. It should be valid.
[in]showWhether to highlight the form field or not.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term recoverable.
  • filler: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]fillerHandle to a FSPDF_FORMFILLER object which is a filler object. It should be valid.
[in]pageHandle 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]page2DevicePointer 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]eventTypeThe type of the event. Please refer to macro definitions FSCRT_EVENT_XXX and this should be one of these macros.
[in]eventDataThe event data, related to parameter eventType. Please refer to structures FSCRT_NOTEDATA_XXX and this should be one of these structure objects.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter filler is a NULL pointer or eventType is invalid. For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term unrecoverable.
  • filler: this handle is long-term partially recoverable.
  • page: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_RenderContext_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.

Parameters
[in]pdfRenderContextHandle to a FSPDF_RENDERCONTEXT object which is a PDF rendering context, created by function FSPDF_RenderContext_Create.
[in]rendererHandle to a FSCRT_RENDERER object which represents a rendering engine, createcd by function FSCRT_Renderer_CreateOnBitmap or platform-dependednt renderer creating functions.
[in]formControlsPointer to a FSPDF_FORMCONTROL array handle which is a PDF form control object.
[in]countA FS_INT32 object that is the number of element in the formControls array.
[out]renderProgressPointer to a FSCRT_PROGRESS handle that receives a handle of progressive process.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter pdfRenderContext, renderer, formControls, or renderProgress is NULL, or count is invalid.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if fails to render form control because of any other reasons.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
FSPDF_RENDERCONTEXTFLAG_NOWIDGET will be ignored in this function if it has been set to parameter pdfRenderContext.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • pdfRenderContext: this handle is long-term recoverable.
  • renderer: this handle is long-term recoverable.
  • formControl: this handle is short-term.
  • renderProgress: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_RenderContext_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.

Parameters
[in]pdfRenderContextHandle to a FSPDF_RENDERCONTEXT object which is a PDF rendering context, created by function FSPDF_RenderContext_Create.
[in]rendererHandle to a FSCRT_RENDERER object which represents a rendering engine, created by function FSCRT_Renderer_CreateOnBitmap or platform-dependednt renderer creating functions.
[in]pageHandle to a FSCRT_PAGE object which is a PDF page.
[out]renderProgressPointer to a FSCRT_PROGRESS handle that receives a handle of progressive process.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter pdfRenderContext, renderer, page, or renderProgress is NULL.
FSCRT_ERRCODE_UNKNOWNSTATE if page form controls are not loaded.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
FSPDF_RENDERCONTEXTFLAG_NOWIDGET will be ignored in this function if it has been set to parameter pdfRenderContext.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • pdfRenderContext: this handle is long-term recoverable.
  • renderer: this handle is long-term recoverable.
  • page: this handle is long-term partially recoverable.
  • renderProgress: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.

Foxit Corporation