FOM Reference > Content > PDF Controls > fPDFAction interface
  
fPDFAction interface
This object specifies actions that can be associated with bookmarks and PDF Form items when publishing to PDF. This object inherits from fControl.
ActionTypes enumeration
These are the different types of actions that can be specified.
The ActionTypes enumeration has the following constants of type int.
TYPE_JAVASCRIPT = 0
Run a JavaScript function.
TYPE_FORMITEM = 1
Hide or show a form item.
TYPE_LAYER = 2
Hide or show a PDF Layer.
TYPE_MENU = 3
Run a named menu item.
TYPE_RESETFORM = 4
Reset form items to their default values.
TYPE_SUBMITFORM = 5
Send values in form items to a specified URL.
TYPE_GOTO = 6
Go to a named destination.
TYPE_URI = 7
Go to a URI.
TYPE_DOCUMENTOPEN = 8
JavaScript to run when the document opens. Actions of this type can only be applied to fPDFPrinter-actionDocumentOpen.
actionType attribute
The type of action to run. Valid values are fPDFAction-ActionTypes.
actionType
Access
read-write
Returns
int
arguments attribute
If fPDFAction.actionType is set to fPDFAction-TYPE_SUBMITFORM, this is the URL to submit the form item values to. If fPDFAction-TYPE_GOTO, this is the filename of the external file to open if required, otherwise the destination specified in fPDFAction.itemname will assume to be in the current document.
arguments
Access
read-write
Returns
String
function attribute
If fPDFAction.actionType is set to fPDFAction-TYPE_JAVASCRIPT, this is the JavaScript function to run.
function
Access
read-write
Returns
Object
itemName attribute
The name of the item to run the action against. If fPDFAction-TYPE_URI, this is the URI to open. This property is ignored for fPDFAction-TYPE_JAVASCRIPT.
itemName
Access
read-write
Returns
String
state attribute
If fPDFAction.actionType is set to fPDFAction-TYPE_FORMITEM or fPDFAction-TYPE_LAYER, setting this property to 0 will hide the item named in fPDFAction.itemName, 1 will show the item. If fPDFAction.actionType is set to fPDFAction-TYPE_SUBMITFORM, setting this property to 0 will only submit form items that have values, 1 will submit all form items regardless of whether they have a value. If fPDFAction.actionType is set to fPDFAction-TYPE_GOTO and an external filename is specified, setting this property to 1 will open the document in a new window, otherwise the document will replace the current document in the same window.
state
Access
read-write
Returns
int