| FoxitPDFSDKforWeb v11.0.6 Archives Foxit PDF SDK for Web

Modules | Classes | Enumerations | Variables
form
PDF

## Modules
| constant

## Classes
class | ChoiceOptionItem
| An option item in a list box or combo box. More...
class | CloneWidgetOptions
| Clone a widget from one page to another. More...
interface | DefaultAppearance
| An interface that represents default appearance data, which is used for free text annotations and forms. More...
interface | DefaultAppearanceFontInfo
| Represents the font information of the default appearance. More...
interface | ExportFormOptions
| Export form options. More...
interface | ExtFieldType
| Extended type information for PDF form fields, with specific properties for different field types. More...
class | FieldFlagOptions
interface | FormInputEvent
| Represents a input event within a form. More...
class | FormInteractionEvent
| Represents an interaction event with a form. More...
interface | FormInteractionEventFlags
| Represents encapsulates flags for a form interaction event. More...
class | FormInteractionEventInterceptorOptions
| Options for form interaction event interceptor. More...
interface | FormKeyboardEvent
| Represents a keyboard event within a form. More...
interface | FormMouseEvent
| Represents a mouse event with a form. More...
interface | FormMouseWheelEvent
| Represents a mouse wheel event within a form. More...
interface | FormPasteEvent
| Represents a paste event within a form. More...
interface | IFormSignatureField
| Interface for handling form signature fields, extending ISignatureField. More...
interface | ImportFormFromCSVOptions
| Import form from CSV/TXT options. More...
interface | ImportFormOptions
| Import form options. More...
class | IncludeExcludeMDPActionData
| Filtering MDP action data. More...
interface | ISignatureField
| Interface representing a signature field in a PDF document. More...
interface | IXFASignatureField
| Interface for handling XFA signature fields, extending ISignatureField. More...
class | MKCaptionOptions
| Options for captions in different widget states. More...
class | MKIconBitmap
| Icon bitmap data. More...
class | MKIconFitOptions
| Options for fitting icons to the widget bounds. More...
class | MKIconOptions
| Icon options for different states of a form widget. More...
class | MoveActionOptions
| Options for moving an additional action. More...
interface | PagingSealConfig
| Represents the information for a paging seal signature. More...
class | PDFForm
| ## Represents a PDF form within a document. This class provides various methods for interacting with and manipulating form fields within a PDF document. It integrates with the underlying document and form APIs to perform operations such as submitting, importing, and resetting form fields. The PDFForm class is also responsible for managing form field events and maintaining the form's state. More...
class | PDFFormField
class | PDFSignature
| Represents a signature field in a PDF form, providing methods for verification and retrieval of signature information. More...
class | SignatureService
| This class provides methods for customizing signature signing/verification behavior. More...
class | SignatureVerificationOptions
| Options for configuring the verification process of PDF form signatures. More...
class | SignatureWorkflowService
| This class is used to record the settings information required for signatures and custom verification handlers. The recorded information will be used in the SDK's built-in signature UI. More...
interface | SignDocInfo
| Signing settings for PDF signatures. More...
class | SignedFormSignatureInfo
| Information regarding a signed form signature. More...
class | SignedXFASignatureInfo
| Information regarding a signed XFA signature. More...
interface | SigningSettings
| Signing settings for PDF signatures. More...
interface | SigningTimeFormat
| The time format infomation. More...
interface | SigningTimeFormatTimeZoneOptions
| The time zone information. More...
class | UnsignedFormSignatureInfo
| Information regarding an unsigned form signature. More...
class | UnsignedXFASignatureInfo
| Information regarding an unsigned form signature. More...

## Enumerations
enum | DefAPFlags { FONT = 0x0001, TEXT_COLOR = 0x0002, TEXT_SIZE = 0x0004 }
| Enumeration for default appearance flags. More...
enum | FormFieldPropertyName { NAME = 'fieldName', VALUE = 'fieldValue', ALTERNATE_NAME = 'fieldAlternateName', FLAGS = 'fieldFlags', MAPPING_NAME = 'fieldMappingName', ALIGNMENT = 'fieldAlignment', MAX_LENGTH = 'maxLength', DEFAULT_VALUE = 'defaultValue', CHOICE_OPTION_ITEMS = 'choiceOptionItems', SELECT_OPTION_ITEM = 'selectOptionItem', CHECKED_BY_DEFAULT = 'checkedByDefault', ACTION = 'form-field-action', CALCULATE_ACTION = 'calculate_action', FORMAT_ACTION = 'format_action', VALIDATE_ACTION = 'validate_action' }
| The following are the property names of the FormField. Those property names are used in the event of FormField's property changed. More...
enum | FormMouseEventButtonType { LEFT_BUTTON = 0, MIDDLE_BUTTON = 1, RIGHT_BUTTON = 2 }
| Represents the type of mouse button in FormMouseEvent. More...
enum | FormWidgetDirection { LEFT_TO_RIGHT = 0, RIGHT_TO_LEFT = 1 }
| Represents the text direction of a widget in a PDF form. More...
enum | PagingSealPosition { left = 'left', right = 'right', top = 'top', bottom = 'bottom' }
| Represents the position for a paging seal signature. More...
enum | ScaleWayType { NONE = 0, ALWAYS = 1, BIGGER = 2, SMALLER = 3, NEVER = 4 }
| Enum values to specify the scale way of a form widget. More...
enum | SignatureType { Ordinary = 0, TimeStamp = 3, PagingSeal = 4 }
| Enumeration for signature type. More...
enum | TextWidgetAlignment { left = 0, center = 1, right = 2 }
| Enum for text alignment. More...
enum | WidgetGestureState { UP = 'up', DOWN = 'down', ROLLOVER = 'rollover' }
| Enum describing the state of a form widget. More...
enum | WidgetIconCaptionRelation { NO_ICON = 0, NO_CAPTION = 1, CAPTION_BELOW_ICON = 2, CAPTION_ABOVE_ICON = 3, CAPTION_RIGHT = 4, CAPTION_LEFT = 5, CAPTION_OVERLAY_ON_ICON = 6 }
| Enum values for the icon caption relation of a form widget. More...

## Variables
type | DigestSignHandler =(signInfo:object,plainBuffer:ArrayBuffer)=>Promise<ArrayBuffer>
| The digest and sign handler for signing. More...
type | EventType = 'keyup' | 'keydown' | 'dblclick' | 'mousedown' | 'mouseup' | 'mousemove' | 'mouseenter' | 'mousehover' | 'mouseleave' | 'mousewheel' | 'paste' | 'input'
| The type of interaction event occurring within a form. More...
type | FormInteractionEventInterceptor = (options:FormInteractionEventInterceptorOptions,next:()=>Promise<unknown>)=>Promise<void>
| Interceptor for form interaction events. More...
type | FormSignatureInfo = UnsignedFormSignatureInfo | SignedFormSignatureInfo
| Union type that represents the information regarding a form signature. More...
type | SignatureInfo = FormSignatureInfo|XFASignatureInfo
| Represents the signature information for a form or XFA signature field. More...
type | SignerOverridePolicy = (field:PDFSignature)=>Promise<string>
| A callback function used to override the signer. More...
type | SigningWorkflowHandler = (field:ISignatureField,settingsList:SigningSettings[])=>Promise<SigningSettings>
| A callback function used to override the signing workflow. This method returns a promise that resolves with the signing settings. After specifying this callback, the default signing dialog will no longer be opened, and the signing operation will be triggered directly with the settings. More...
type | VerifySignatureHandler = (field:PDFSignature,plainContent:Uint8Array,signedData:Uint8Array,hasDataOutOfScope:boolean)=>Promise<number>
| A callback used to send the signed data to the server and receive the verification result. More...
type | VerifyWorkflowHandler = (field: ISignatureField)=>Promise<number>
| A callback function used to verify the signature. More...
type | XFASignatureInfo = UnsignedXFASignatureInfo|SignedXFASignatureInfo
| Union type that represents the information regarding an XFA signature. More...

## Detailed Description

Form namespace.

## Enumeration Type Documentation

## ◆ DefAPFlags

enum DefAPFlags

Enumeration for default appearance flags.

Since
  11.0.0

Enumerator
FONT | Indicates property font of DefaultAppearance is meaningful.
TEXT_COLOR | Indicates property textColor of DefaultAppearance is meaningful.
TEXT_SIZE | Indicates property textSize of DefaultAppearance is meaningful.

## ◆ FormFieldPropertyName

enum FormFieldPropertyName

The following are the property names of the FormField. Those property names are used in the event of FormField's property changed.

See also
  DataEvents.formFieldPropertyUpdated

Since
  11.0.0

Enumerator
NAME | The name of the field. See also PDFFormField.setName
VALUE | The value of the field. See also PDFFormField.setValue
ALTERNATE_NAME | The alternate name of the field. See also PDFFormField.setAlternateName
FLAGS | The flags of the field. See also PDFFormField.updateFlagByOptions
MAPPING_NAME | The mapping name of the field. See also PDFFormField.setMappingName
ALIGNMENT | The alignment of the field. See also PDFFormField.setAlignment
MAX_LENGTH | The maximum length of the field. See also PDFFormField.setMaxLength
DEFAULT_VALUE | The default value of the field. See also PDFFormField.setDefaultValue
CHOICE_OPTION_ITEMS | The options of the field. See also PDFFormField.setOptions
SELECT_OPTION_ITEM | The selected option index of the field. See also PDFFormField.selectOption
CHECKED_BY_DEFAULT | Whether the field is checked by default. See also PDFFormField.setCheckedByDefault
ACTION | The action associated with the field. See also PDFFormField.setAction
CALCULATE_ACTION | The calculate action associated with the field. See also PDFFormField.setCalculateAction
FORMAT_ACTION | The format action associated with the field. See also PDFFormField.setFormatAction PDFFormField.removeFormatAction PDFFormField.setNumberFormatAction PDFFormField.setPercentageFormatAction PDFFormField.setDateFormatAction PDFFormField.setTimeFormatAction PDFFormField.setSpecialFormatAction PDFFormField.setCustomFormatAction
VALIDATE_ACTION | The validate action associated with the field. See also PDFFormField.setValidateAction

## ◆ FormMouseEventButtonType

enum FormMouseEventButtonType

Represents the type of mouse button in FormMouseEvent.

Since
  11.0.0

Enumerator
LEFT_BUTTON | The left mouse button.
MIDDLE_BUTTON | The middle mouse button.
RIGHT_BUTTON | The right mouse button.

## ◆ FormWidgetDirection

enum FormWidgetDirection

Represents the text direction of a widget in a PDF form.

Since
  11.0.0

Enumerator
LEFT_TO_RIGHT | Indicates that the text flows from left to right.
RIGHT_TO_LEFT | Indicates that the text flows from right to left.

## ◆ PagingSealPosition

enum PagingSealPosition

Represents the position for a paging seal signature.

Since
  11.0.0

Enumerator
left | The paging seal is placed on the left side of the page.
right | The paging seal is placed on the right side of the page.
top | The paging seal is placed on the top of the page.
bottom | The paging seal is placed on the bottom of the page.

## ◆ ScaleWayType

enum ScaleWayType

Enum values to specify the scale way of a form widget.

Since
  11.0.0

Enumerator
NONE | No scaling.
ALWAYS | Always scale.
BIGGER | Scale when the widget is bigger than the bounding box.
SMALLER | Scale when the widget is smaller than the bounding box.
NEVER | Never scale.

## ◆ SignatureType

enum SignatureType

Enumeration for signature type.

Since
  11.0.0

See also
  PDFSignature.getSignatureType

Enumerator
Ordinary | Ordinary signature type.
TimeStamp | Time stamp signature type.
PagingSeal | Paging seal signature type.

## ◆ TextWidgetAlignment

enum TextWidgetAlignment

Enum for text alignment.

Enumerator
left | Align text to the left.
center | Align text to the center.
right | Align text to the right.

## ◆ WidgetGestureState

enum WidgetGestureState

Enum describing the state of a form widget.

Since
  11.0.0

Enumerator
UP | The widget is not being interacted with.
DOWN | The widget is being interacted with (e.g. clicked).
ROLLOVER | The pointer is over the widget.

## ◆ WidgetIconCaptionRelation

enum WidgetIconCaptionRelation

Enum values for the icon caption relation of a form widget.

Since
  11.0.0

Enumerator
NO_ICON | No icon is displayed.
NO_CAPTION | No caption is displayed.
CAPTION_BELOW_ICON | The caption is displayed below the icon.
CAPTION_ABOVE_ICON | The caption is displayed above the icon.
CAPTION_RIGHT | The caption is displayed to the right of the icon.
CAPTION_LEFT | The caption is displayed to the left of the icon.
CAPTION_OVERLAY_ON_ICON | The caption is overlayed on top of the icon.

## Variable Documentation

## ◆ DigestSignHandler

type DigestSignHandler =(signInfo:object,plainBuffer:ArrayBuffer)=>Promise<ArrayBuffer>

The digest and sign handler for signing.

Since
  11.0.0

See also
  SignDocInfo
  PDFDoc.sign
  SigningSettings
  SignatureWorkflowService.addSigningSettings

## ◆ EventType

type EventType = 'keyup' | 'keydown' | 'dblclick' | 'mousedown' | 'mouseup' | 'mousemove' | 'mouseenter' | 'mousehover' | 'mouseleave' | 'mousewheel' | 'paste' | 'input'

The type of interaction event occurring within a form.

Since
  11.0.0

## ◆ FormInteractionEventInterceptor

type FormInteractionEventInterceptor = (options:FormInteractionEventInterceptorOptions,next:()=>Promise<unknown>)=>Promise<void>

Interceptor for form interaction events.

The interceptor is called when a form interaction event is triggered, such as a mouse click or key press. The interceptor can call the next interceptor by calling the next function, or settle the event by not calling the next function.

See also
  FormFillerService.appendInteractionEventInterceptor

Since
  11.0.0

See also
  FormInteractionEventInterceptorOptions

## ◆ FormSignatureInfo

type FormSignatureInfo = UnsignedFormSignatureInfo | SignedFormSignatureInfo

Union type that represents the information regarding a form signature.

Since
  11.0.0

## ◆ SignatureInfo

type SignatureInfo = FormSignatureInfo|XFASignatureInfo

Represents the signature information for a form or XFA signature field.

Since
  11.0.0

## ◆ SignerOverridePolicy

type SignerOverridePolicy = (field:PDFSignature)=>Promise<string>

A callback function used to override the signer.

Since
  11.0.0

See also
  SignatureWorkflowService.setSignerOverridePolicy

## ◆ SigningWorkflowHandler

type SigningWorkflowHandler = (field:ISignatureField,settingsList:SigningSettings[])=>Promise<SigningSettings>

A callback function used to override the signing workflow. This method returns a promise that resolves with the signing settings. After specifying this callback, the default signing dialog will no longer be opened, and the signing operation will be triggered directly with the settings.

Parameters

  field | ISignatureField - The signature field which is being signed.
  settingsList | SigningSettings[] - The list of signing settings currently available.

Returns
  Promise<SigningSettings> - A promise that resolves with the customized signing settings.

Since
  11.0.0

## ◆ VerifySignatureHandler

type VerifySignatureHandler = (field:PDFSignature,plainContent:Uint8Array,signedData:Uint8Array,hasDataOutOfScope:boolean)=>Promise<number>

A callback used to send the signed data to the server and receive the verification result.

Since
  11.0.0

See also
  SignatureWorkflowService.setVerifyHandler

## ◆ VerifyWorkflowHandler

type VerifyWorkflowHandler = (field: ISignatureField)=>Promise<number>

A callback function used to verify the signature.

Parameters

  field | ISignatureField - The signature field which is being verified.

Returns
  Promise<number> - A promise that resolves with the verification result.

## ◆ XFASignatureInfo

type XFASignatureInfo = UnsignedXFASignatureInfo|SignedXFASignatureInfo

Union type that represents the information regarding an XFA signature.

Since
  11.0.0

@2025 Foxit Software Incorporated. All rights reserved.