API Documentation for Action
NoPoDoFo Action
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
}
Constructors
new Action(t: NPDFActions, doc: Document): Action
Create a new action of type NPDFActions
Properties
type
This is a readonly property returning the NPDFActions type. An actions Type
must be defined at the time of creation.
uri
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.
script
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.
Methods
getObject
getObject(): Object
Get the underlying action Object.
addToDictionary
addToDictionary(dictionary: Dictionary): void
Handles properly adding the action to a Dictionary.