Foxit PDF SDK

Public Types | Public Member Functions | List of all members
foxit::pdf::actions::SubmitFormAction Class Reference
Inheritance diagram for foxit::pdf::actions::SubmitFormAction:

## Public Types
enum | Flags { e_FlagExclude = 0x0001, e_FlagIncludeNoValueFields = 0x0002, e_FlagExportFormat = 0x0004, e_FlagGetMethod = 0x0008, e_FlagWithCoordinates = 0x0010, e_FlagAsXFDF = 0x0020, e_FlagIncludeAppendSaves = 0x0040, e_FlagIncludeAnnotations = 0x0080, e_FlagSubmitAsPDF = 0x0100, e_FlagCanonicalFormat = 0x0200, e_FlagExclNonUserAnnots = 0x0400, e_FlagExclFKey = 0x0800, e_FlagEmbedForm = 0x2000 }
| Enumeration for flags of submit form action. More...
Public Types inherited from foxit::pdf::actions::Action
enum | NewWindowFlag { e_NewWindowFlagFalse = 0, e_NewWindowFlagTrue = 1, e_NewWindowFlagNone = 2 }
| Enumeration for new window flag. More...
enum | Type { e_TypeUnknown = 0, e_TypeGoto = 1, e_TypeGoToR = 2, e_TypeGoToE = 3, e_TypeLaunch = 4, e_TypeThread = 5, e_TypeURI = 6, e_TypeSound = 7, e_TypeMovie = 8, e_TypeHide = 9, e_TypeNamed = 10, e_TypeSubmitForm = 11, e_TypeResetForm = 12, e_TypeImportData = 13, e_TypeJavaScript = 14, e_TypeSetOCGState = 15, e_TypeRendition = 16, e_TypeTrans = 17, e_TypeGoTo3DView = 18 }
| Enumeration for action type. More...

## Public Member Functions
| SubmitFormAction (const Action &action)
| Constructor, with parent class object. More...
WStringArray | GetFieldNames ()
| Get all field names from the array in current submit form action. More...
uint32 | GetFlags ()
| Get the flag value used for submission. More...
String | GetURL ()
| Get the URI string of the script at the Web server that will process the submission. More...
void | SetFieldNames (const WStringArray &field_names)
| Set field name array. More...
void | SetFlags (uint32 flags)
| Set the flag value used for submission. More...
void | SetURL (const String &url)
| Set the URI string of the script at the Web server that will process the submission. More...
Public Member Functions inherited from foxit::pdf::actions::Action
| Action (const PDFDoc &document, objects::PDFDictionary *action_dict)
| Constructor, with parameters. More...
| Action (const Action &action)
| Constructor, with another action object. More...
| ~Action ()
| Destructor.
objects::PDFDictionary * | GetDict () const
| Get PDF dictionary of current object. More...
PDFDoc | GetDocument ()
| Get the PDF document, to which current action belongs. More...
Action | GetSubAction (int index)
| Get a sub-action by index. More...
int | GetSubActionCount ()
| Get the count of sub-actions. More...
Type | GetType ()
| Get action type. More...
void | InsertSubAction (int index, const Action &sub_action)
| Insert a new sub-action to the location specified by index. More...
bool | IsEmpty () const
| Check whether current object is empty or not. More...
bool | operator != (const Action &other) const
| Not equal operator. More...
Action & | operator= (const Action &other)
| Assign operator. More...
bool | operator== (const Action &other) const
| Equal operator. More...
void | RemoveAllSubActions ()
| Remove all the sub-actions. More...
void | RemoveSubAction (int index)
| Remove a sub-action, specified by index. More...
void | SetSubAction (int index, const Action &sub_action)
| Set a sub-action by index. More...
Public Member Functions inherited from foxit::Base
FS_HANDLE | Handle () const
| Get the handle of current object. More...

## Additional Inherited Members
Static Public Member Functions inherited from foxit::pdf::actions::Action
static Action | Create (const foxit::pdf::PDFDoc &document, Type action_type)
| Create a new action, for specified action type. More...

## Detailed Description

Submit-form action is to send data to a uniform resource locator. Class actions::SubmitFormAction is derived from Action and offers functions to get/set submit-form action data.

See also
  Action

## Member Enumeration Documentation

## ◆ Flags

enum foxit::pdf::actions::SubmitFormAction::Flags

Enumeration for flags of submit form action.

Values of this enumeration could be used alone or in a combination.

Enumerator
e_FlagExclude | Bit 1. If set, fields name defined in submit form action should be excluded from submitting; if not set, only these fields name (including their descendants) are to be submit.
e_FlagIncludeNoValueFields | Bit 2. Submit fields regardless of whether they have a value. Note For fields without a value, only the field name is transmitted.
e_FlagExportFormat | Bit 3. Field names and values are submitted in HTML Form format. Note Meaningful only if flags SubmitFormAction::e_FlagAsXFDF and SubmitFormAction::e_FlagSubmitAsPDF are clear. If this flag is clear, that means to submit in Forms Data Format (FDF).
e_FlagGetMethod | Bit 4. Field names and values are submitted using an HTTP GET request. Note Meaningful only when flag SubmitFormAction::e_FlagExportFormat is set. If this flag is clear, that means to submit using a POST request.
e_FlagWithCoordinates | Bit 5. Coordinates of the mouse are transmitted as part of the form data.
e_FlagAsXFDF | Bit 6. Field names and values are submitted as XFDF.
e_FlagIncludeAppendSaves | Bit 7. Submitted FDF file includes contents as contained in differences entry in the FDF dictionary. Note Meaningful only when the form is being submitted in Forms Data Format.
e_FlagIncludeAnnotations | Bit 8. Submitted FDF file includes all markup annotations in underlying PDF document. Note Meaningful only when the form is being submitted in Forms Data Format.
e_FlagSubmitAsPDF | Bit 9. The document is submitted as PDF.
e_FlagCanonicalFormat | Bit 10. Any submitted field values representing dates are converted to the standard format.
e_FlagExclNonUserAnnots | Bit 11. Only those markup annotations whose "T" entry matches the name of the current user are being submitted.
e_FlagExclFKey | Bit 12. Submitted FDF excludes "F" entry.
e_FlagEmbedForm | Bit 14. "F" entry of submitted FDF is an embedded file stream.

## Constructor & Destructor Documentation

## ◆ SubmitFormAction()

foxit::pdf::actions::SubmitFormAction::SubmitFormAction | ( | const Action & | action | ) |
| explicit

Constructor, with parent class object.

Parameters

  [in] | action | Parent class object.

## Member Function Documentation

## ◆ GetFieldNames()

WStringArray foxit::pdf::actions::SubmitFormAction::GetFieldNames | ( |  | ) |

Get all field names from the array in current submit form action.

A submit form action can have an array identifying which fields to include in the submission or which to exclude, depending on the flag value.

Returns
  An array of field names.

## ◆ GetFlags()

uint32 foxit::pdf::actions::SubmitFormAction::GetFlags | ( |  | ) |

Get the flag value used for submission.

Returns
  Flag value. Please refer to values starting from SubmitFormAction::e_FlagExclude and this would be one or a combination of these values. 0 means all bits in the flag are 0.

## ◆ GetURL()

String foxit::pdf::actions::SubmitFormAction::GetURL | ( |  | ) |

Get the URI string of the script at the Web server that will process the submission.

Returns
  URI string.

## ◆ SetFieldNames()

void foxit::pdf::actions::SubmitFormAction::SetFieldNames | ( | const WStringArray & | field_names | ) |

Set field name array.

A submit form action can have an array identifying which fields to include in the submission or which to exclude, depending on the flag value.

Parameters

  [in] | field_names | An array of form fields' names, to identify which fields to include in or exclude from submission. This parameter can be an empty array. Field name can be retrieved by function interform::Field::GetName.

Returns
  None.

## ◆ SetFlags()

void foxit::pdf::actions::SubmitFormAction::SetFlags | ( | uint32 | flags | ) |

Set the flag value used for submission.

Parameters

  [in] | flags | New flag value. Please refer to values starting from SubmitFormAction::e_FlagExclude and this can be one or a combination of these values It could also be 0, which means all bits in the flag are 0.

Returns
  None.

## ◆ SetURL()

void foxit::pdf::actions::SubmitFormAction::SetURL | ( | const String & | url | ) |

Set the URI string of the script at the Web server that will process the submission.

Parameters

  [in] | url | URI string. It should not be an empty string.

Returns
  None.