A Document action. An action is used in conjunction with an Annotation or a Outline. PDF supports a variety of action types; NPDFActions. See Bookmarks for action examples.
class Action {
new(type: NPDFActions, doc: Document): Action
readonly type: NPDFActions
uri?: string
script?: string
getObject(): Object
addToDictionary(dictionary: Dictionary): void
}
new Action(t: NPDFActions, doc: Document): Action
Create a new action of type NPDFActions
This is a readonly property returning the NPDFActions type. An actions Type
must be defined at the time of creation.
This property gets or sets the URI
property of the action Dictionary. This is a required field when the NPDFActions type is
a URI
action.
This is a required property of a JavaScript
type action. This script will be executed when the action is activated. Please familiarize yourself with the Adobe Acrobat JavaScript API Reference Materials.
getObject(): Object
Get the underlying action Object.
addToDictionary(dictionary: Dictionary): void
Handles properly adding the action to a Dictionary.