| FoxitPDFSDKforWeb v11.1.0 Archives Foxit PDF SDK for Web

Classes | Enumerations | Variables
actions
PDF

## Classes
class | Action
| PDF action object. More...
interface | ActionSpecWithTrigger
| Represents an action specification with a trigger event. This combines the action specification with the trigger event that will execute the action. More...
class | AdditionalAction< T >
| An annotation, page object, or (beginning with PDF 1.3) interactive form field may include an entry named "AA" which specifies an additional-actions dictionary (PDF 1.2) that extends the set of events that can trigger the execution of an action. In PDF 1.4, the document catalog dictionary may also contain an "AA" entry for trigger events affecting the document as a whole. More...
class | EmbeddedGotoAction
| EmbeddedGoto action object. More...
interface | EmbeddedGotoActionData
| Indicates that the destination thread is not in the current document. More...
interface | EmbeddedGotoTargetData
| The object numbers of the visible OCG layer nodes. More...
class | EmbeddedGotoTargetFileInfo
| Represents the file information of an embedded go-to target. More...
class | FileSpecData
| Represents file specification data used for handling files. More...
class | GoToAction
| GoTo action object. More...
interface | GotoActionData
| Represents the data for a goto action, specifying the destination. More...
class | HideAction
| Hide action object. More...
interface | HideActionData
| Represents the data for a hide action, specifying field names to hide and the hide state. More...
interface | ImportDataActionData
| Represents the data for an import data action, specifying the file to import. More...
class | JavaScriptAction
| JavaScript action object. More...
interface | JavaScriptActionData
| Represents the data for a JavaScript action, containing the JavaScript code to execute. More...
class | LaunchAction
| Launch action object. More...
interface | LaunchActionData
| Represents the data for a launch action, specifying the file to launch. More...
class | RemoteGotoAction
| RemoteGoto action object. More...
interface | RemoteGotoActionData
| Represents the data for a remote goto action, specifying the file and destination. More...
class | ResetFormAction
| ResetForm action object. More...
interface | ResetFormActionData
| Represents the data for a reset form action, specifying form fields and optional flags. More...
class | SubmitFormAction
| SubmitForm action object. More...
interface | SubmitFormActionData
| Represents the data for a submit form action, specifying form fields and the destination address. More...
class | URIAction
| URI action object. More...
interface | URIActionData
| Represents the data for a URI action. More...
class | ZoomFitBBoxDestinationData
| Destination data for zooming to fit the bounding box of the page contents within the window. ZoomFitBBoxDestinationData. More...
class | ZoomFitBHorzDestinationData
| Destination data for zooming to fit the width of the bounding box of the page contents to the window. The `top` parameter specifies the vertical distance from the page origin to the top edge of the window. More...
class | ZoomFitBVertDestinationData
| Destination data for zooming to fit the height of the page vertically. The `left` parameter specifies the horizontal distance from the page origin to the left edge of the window. ZoomFitBVertDestinationData. More...
class | ZoomFitHorzDestinationData
| Destination data for zooming to fit the width of the page to the window. The `top` parameter specifies the vertical distance from the page origin to the top edge of the window. This is equivalent to using a fit rect destination with a rectangle that spans the full width of the page, where both y-coordinates are set to the specified `top` value. ZoomFitHorzDestinationData. More...
class | ZoomFitPageDestinationData
| Destination data for zooming to fit the entire page within the window. This is equivalent to specifying a fit rect destination where the rectangle corresponds to the crop box of the page, ensuring the entire page is visible. More...
class | ZoomFitRectDestinationData
| Destination data for zooming to fit a specific rectangular area on the page. ZoomFitRectDestinationData. More...
class | ZoomFitVertDestinationData
| Destination data for zooming to fit the height of the page to the window. The 'left' parameter specifies the horizontal position from the page origin to the left edge of the window. This is equivalent to a FitRect destination where the rectangle has the full height of the page and both x-coordinates are set to the 'left' value. ZoomFitVertDestinationData. More...
class | ZoomXYZDestinationData
| Destination data for zooming to a specific position with a defined zoom factor. The 'left' and 'top' parameters specify the distance from the origin of the page to the top-left corner of the window. The 'zoomFactor' parameter specifies the magnification level, where 1.0 represents 100% magnification. If any of the 'left', 'top', or 'zoomFactor' parameters are null, the current value of that parameter is retained. For example, specifying a view destination of `/View [/XYZ NULL NULL NULL]` will navigate to the specified page while maintaining the current horizontal position, vertical position, and zoom level. A 'zoomFactor' of 0 is equivalent to null. ZoomXYZDestinationData. More...

## Enumerations
enum | ActionTriggerEvents { NONE = -1, PAGE_OPENED = 0, PAGE_CLOSED = 1, DOC_WILL_CLOSE = 2, DOC_WILL_SAVE = 3, DOC_SAVED = 4, DOC_WILL_PRINT = 5, DOC_PRINTED = 6, FIELD_KEY_STROKE = 7, FIELD_WILL_FORMAT = 8, FIELD_VALUE_CHANGED = 9, FIELD_RECALCULATE_VALUE = 10, ANNOT_CURSOR_ENTER = 11, ANNOT_CURSOR_EXIT = 12, ANNOT_MOUSE_BUTTON_PRESSED = 13, ANNOT_MOUSE_BUTTON_RELEASED = 14, ANNOT_RECEIVE_INPUT_FOCUS = 15, ANNOT_LOSE_INPUT_FOCUS = 16, ANNOT_PAGE_OPENED = 17, ANNOT_PAGE_CLOSED = 18, ANNOT_PAGE_VISIBLE = 19, ANNOT_PAGE_INVISIBLE = 20 }
| Enum representing action trigger events. More...
enum | ActionType { goto = 'TypeGoto', launch = 'TypeLaunch', uri = 'TypeURI' , submitForm = 'TypeSubmitForm', resetForm = 'TypeResetForm', javaScript = 'TypeJavaScript', importData = 'TypeImportData', hide = 'TypeHide', gotoE = 'TypeGoToE', gotoR = 'TypeGoToR' }
| Enumeration for action type. More...
enum | EmbeddedGotoTargetRelationship { Parent = 'P', Child = 'C' }
| Defines the relationship between the current target object and another object in the embedded go-to action. More...
enum | NewWindowFlag { NewWindowFlagFalse = 0, NewWindowFlagTrue = 1, NewWindowFlagNone = 2 }
| Enumeration for new window flag. More...
enum | ZoomMode { ZoomFitBBox = 'ZoomFitBBox', ZoomFitBHorz = 'ZoomFitBHorz', ZoomFitBVert = 'ZoomFitBVert', ZoomFitHorz = 'ZoomFitHorz', ZoomFitVert = 'ZoomFitVert', ZoomFitPage = 'ZoomFitPage', ZoomFitRect = 'ZoomFitRect', ZoomXYZ = 'ZoomXYZ' }
| Enumeration for zoom mode. More...

## Variables
type | ActionData = URIActionData | GotoActionData | RemoteGotoActionData | HideActionData | LaunchActionData | SubmitFormActionData | JavaScriptActionData | ResetFormActionData | ImportDataActionData | EmbeddedGotoActionData
| Represents the different data structures for all available action types. Each action type has a corresponding data structure that defines the necessary information to execute the action. More...
type | ActionHierarchy = {objNumber: number;subAction: ActionHierarchy[];} & ActionSpecification
| Represents a hierarchical action structure, where each action can have sub-actions. This allows complex actions to be nested and executed in a hierarchical manner. More...
type | ActionSpecification = { type: ActionType.uri;data: URIActionData;}| {type: ActionType.goto; data: GotoActionData; }| { type: ActionType.gotoR; data: RemoteGotoActionData; }| { type: ActionType.hide; data: HideActionData; }| { type: ActionType.launch; data: LaunchActionData; }| { type: ActionType.submitForm; data: SubmitFormActionData; }| { type: ActionType.javaScript; data: JavaScriptActionData; }| { type: ActionType.resetForm; data: ResetFormActionData; }| { type: ActionType.importData; data: ImportDataActionData; }| { type: ActionType.gotoE, data: EmbeddedGotoActionData}
| Defines the structure for different types of actions and their associated data. Each action type corresponds to a specific action and requires specific data. More...
type | AnnotActionTriggerEvents = ActionTriggerEvents
| Enum representing annotation widget action trigger events. More...
export type | DestinationData = ZoomFitBBoxDestinationData | ZoomFitBHorzDestinationData | ZoomFitBVertDestinationData | ZoomFitHorzDestinationData | ZoomFitPageDestinationData | ZoomFitRectDestinationData | ZoomFitVertDestinationData | ZoomXYZDestinationData
| Union type representing various zoom destination data formats. This union type encompasses all possible zoom destination data formats for different zoom modes. More...
type | DocActionTriggerEvents = ActionTriggerEvents
| Enum representing doc action trigger events. More...
type | FieldActionTriggerEvents = ActionTriggerEvents
| Enum representing form field action trigger events. More...
type | PageActionTriggerEvents = ActionTriggerEvents
| Enum representing page action trigger events. More...

## Detailed Description

## Enumeration Type Documentation

## ◆ ActionTriggerEvents

enum ActionTriggerEvents

Enum representing action trigger events.

These events define when an action should be triggered.

Since
  11.0.0

Enumerator
NONE | No trigger event is specified.
PAGE_OPENED | Trigger an action when the page is opened. Applicable only to additional action objects created from a PDF page.
PAGE_CLOSED | Trigger an action when the page is closed. Applicable only to additional action objects created from a PDF page.
DOC_WILL_CLOSE | Trigger a JavaScript action before the document is closed. Applicable only to additional action objects created from a PDF document.
DOC_WILL_SAVE | Trigger a JavaScript action before the document is saved. Applicable only to additional action objects created from a PDF document.
DOC_SAVED | Trigger a JavaScript action after the document is saved. Applicable only to additional action objects created from a PDF document.
DOC_WILL_PRINT | Trigger a JavaScript action before the document is printed. Applicable only to additional action objects created from a PDF document.
DOC_PRINTED | Trigger a JavaScript action after the document is printed. Applicable only to additional action objects created from a PDF document.
FIELD_KEY_STROKE | Trigger a JavaScript action when the user types a keystroke into a text field, combo box, or modifies the selection in a scrollable list box. Applicable only to additional action objects created from a PDF form field. The triggered action can validate or modify the keystroke.
FIELD_WILL_FORMAT | Trigger a JavaScript action before the field is formatted to display its value. Applicable only to additional action objects created from a PDF form field. The triggered action can modify the field's value before formatting.
FIELD_VALUE_CHANGED | Trigger a JavaScript action when the field's value is changed. Applicable only to additional action objects created from a PDF form field. The triggered action can validate the new value.
FIELD_RECALCULATE_VALUE | Trigger a JavaScript action to recalculate the field's value when another field changes. Applicable only to additional action objects created from a PDF form field. The order of recalculation can be determined by the `PDFForm.getFieldsInCalculationOrder` function.
ANNOT_CURSOR_ENTER | Trigger an action when the cursor enters the annotation's active area. Applicable only to additional action objects created from a PDF annotation.
ANNOT_CURSOR_EXIT | Trigger an action when the cursor exits the annotation's active area. Applicable only to additional action objects created from a PDF annotation.
ANNOT_MOUSE_BUTTON_PRESSED | Trigger an action when the mouse button is pressed inside the annotation's active area. Applicable only to additional action objects created from a PDF annotation.
ANNOT_MOUSE_BUTTON_RELEASED | Trigger an action when the mouse button is released inside the annotation's active area. Applicable only to additional action objects created from a PDF annotation.
ANNOT_RECEIVE_INPUT_FOCUS | (Applicable for widget annotations only) Trigger an action when the annotation receives input focus. Applicable only to additional action objects created from a widget annotation.
ANNOT_LOSE_INPUT_FOCUS | (Applicable for widget annotations only) Trigger an action when the annotation loses input focus. Applicable only to additional action objects created from a widget annotation.
ANNOT_PAGE_OPENED | Trigger an action when the page containing the annotation is opened. Applicable only to additional action objects created from a PDF annotation. The triggered action is executed after the action for `PAGE_OPENED` and any open action in the PDF document, if present.
ANNOT_PAGE_CLOSED | Trigger an action when the page containing the annotation is closed. Applicable only to additional action objects created from a PDF annotation. The triggered action is executed after the action for `PAGE_CLOSED`, if present.
ANNOT_PAGE_VISIBLE | Trigger an action when the page containing the annotation becomes visible in the viewer's UI. Applicable only to additional action objects created from a PDF annotation.
ANNOT_PAGE_INVISIBLE | Trigger an action when the page containing the annotation is no longer visible in the viewer's UI. Applicable only to additional action objects created from a PDF annotation.

## ◆ ActionType

enum ActionType

Enumeration for action type.

Since
  11.0.0

Enumerator
goto | Go-to action is an action that changes the view to a specified destination (page, location, and magnification factor).
launch | Launch action is to launch an application, usually to open a file.
uri | URI (uniform resource identifier) action is an action that causes a URI to be resolved.
submitForm | Submit-form action is to send data to a uniform resource locator.
resetForm | Reset-form action is to set fields to their default values.
javaScript | JavaScript action is an action that causes a script to be compiled and executed by the JavaScript interpreter.
importData | Import-data action is to import field values from a FDF file.
hide | Hide action is to hide or show specified form fields.
gotoE | Embedded go-to action is similar to a remote go-to action but allows jumping to or from a PDF file that is embedded in another PDF file. Note Foxit PDF SDK for Web currently only supports retrieving data for this action type. Creating, editing, and executing this type of action is not supported.
gotoR | Remote go-to action is similar to an ordinary go-to action but jumps to a destination in another PDF file (not embedded file) instead of current PDF file (which contains the remote go-to action). Note Foxit PDF SDK for Web currently does not support executing this type of Action, but it allows creating, editing, and retrieving the related data.

## ◆ EmbeddedGotoTargetRelationship

enum EmbeddedGotoTargetRelationship

Defines the relationship between the current target object and another object in the embedded go-to action.

Since
  11.0.0

Enumerator
Parent | Indicates that the current target object is the parent of the object that the current target object belongs to. In this context, "Parent" means that the current target object contains or owns the object referred to in the action.
Child | Indicates that the current target object is the child of the object that the current target object belongs to. "Child" means that the current target object is contained within or is a part of the object referred to in the action.

## ◆ NewWindowFlag

enum NewWindowFlag

Enumeration for new window flag.

Since
  11.0.0

Enumerator
NewWindowFlagFalse | "NewWindow" flag is false, means to open the destination document in a new window.
NewWindowFlagTrue | "NewWindow" flag is true, means that the destination document replaces current document in the same window.
NewWindowFlagNone | Means that no such "NewWindow" flag and viewer application should behave in accordance with the current user preference.

## ◆ ZoomMode

enum ZoomMode

Enumeration for zoom mode.

Since
  11.0.0

Enumerator
ZoomFitBBox | Fit the bounding box of page entirely within the display area when display the page. If this is used, that means the contents of the page should be magnified just enough to fit its bounding box entirely within the display area both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the bounding box within the display area in the other dimension. Since 10.0.0
ZoomFitBHorz | Fit the entire width of the page's bounding box within the display area when display the page. If this is used, that means the contents of the page should be magnified just enough to fit the entire width of the page's bounding box within the display area. Since 10.0.0
ZoomFitBVert | Fit the entire height of the page's bounding box within the display area when display the page. If this is used, that means the contents of the page should be magnified just enough to fit the entire height of the page's bounding box within the display area. Since 10.0.0
ZoomFitHorz | Fit the entire width of the page within the display area when display the page. If this is used, that means the contents of the page should be magnified just enough to fit the entire width of the page within the display area. Since 10.0.0
ZoomFitVert | Fit the entire height of the page within the display area when display the page. If this is used, that means the contents of the page should be magnified just enough to fit the entire height of the page within the display area. Since 10.0.0
ZoomFitPage | Fit the entire page within the display area when display the page. If this is used, that means the contents of the page should be magnified just enough to fit the entire page within the display area both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the page within the window in the other dimension. Since 10.0.0
ZoomFitRect | Fit the page content in a specified rectangle entirely within the display area when display the page. If this is used, that means the contents of the page should be magnified just enough to fit the page content in the specified rectangle entirely within the display area both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the rectangle within the display area in the other dimension. Since 10.0.0
ZoomXYZ | Display page with a specified position and a specified zoom factor. If this is used, that means the specified position of the page will be treated as the left-top position when the page is rendered and this position should be at the upper-left corner of the display area. Contents of the page should be magnified by the specified zoom factor. Since 10.0.0

## Variable Documentation

## ◆ ActionData

type ActionData = URIActionData | GotoActionData | RemoteGotoActionData | HideActionData | LaunchActionData | SubmitFormActionData | JavaScriptActionData | ResetFormActionData | ImportDataActionData | EmbeddedGotoActionData

Represents the different data structures for all available action types. Each action type has a corresponding data structure that defines the necessary information to execute the action.

Since
  11.0.0

## ◆ ActionHierarchy

type ActionHierarchy = {objNumber: number;subAction: ActionHierarchy[];} & ActionSpecification

Represents a hierarchical action structure, where each action can have sub-actions. This allows complex actions to be nested and executed in a hierarchical manner.

Since
  11.0.0

## ◆ ActionSpecification

type ActionSpecification = { type: ActionType.uri;data: URIActionData;}| {type: ActionType.goto; data: GotoActionData; }| { type: ActionType.gotoR; data: RemoteGotoActionData; }| { type: ActionType.hide; data: HideActionData; }| { type: ActionType.launch; data: LaunchActionData; }| { type: ActionType.submitForm; data: SubmitFormActionData; }| { type: ActionType.javaScript; data: JavaScriptActionData; }| { type: ActionType.resetForm; data: ResetFormActionData; }| { type: ActionType.importData; data: ImportDataActionData; }| { type: ActionType.gotoE, data: EmbeddedGotoActionData}

Defines the structure for different types of actions and their associated data. Each action type corresponds to a specific action and requires specific data.

Since
  11.0.0

## ◆ AnnotActionTriggerEvents

export type AnnotActionTriggerEvents = ActionTriggerEvents

Enum representing annotation widget action trigger events.

Since
  11.0.0

## ◆ DestinationData

export type DestinationData = ZoomFitBBoxDestinationData | ZoomFitBHorzDestinationData | ZoomFitBVertDestinationData | ZoomFitHorzDestinationData | ZoomFitPageDestinationData | ZoomFitRectDestinationData | ZoomFitVertDestinationData | ZoomXYZDestinationData

Union type representing various zoom destination data formats. This union type encompasses all possible zoom destination data formats for different zoom modes.

Since
  11.0.0

## ◆ DocActionTriggerEvents

export type DocActionTriggerEvents = ActionTriggerEvents

Enum representing doc action trigger events.

Since
  11.0.0

## ◆ FieldActionTriggerEvents

export type FieldActionTriggerEvents = ActionTriggerEvents

Enum representing form field action trigger events.

Since
  11.0.0

## ◆ PageActionTriggerEvents

export type PageActionTriggerEvents = ActionTriggerEvents

Enum representing page action trigger events.

Since
  11.0.0

@2026 Foxit Software Incorporated. All rights reserved.