Class Index

Classes


Class PDFNet.Action

PDFNet.Action

Class Summary
Constructor Attributes Constructor Name and Description
 
Actions are typically what happens when a user clicks on a link or bookmark.
Method Summary
Method Attributes Method Name and Description
 
compare(in_action)
Compares two Action objects for equality.
 
copy()
Copy Constructor
<static>  
PDFNet.Action.create(in_obj)
A constructor.
<static>  
PDFNet.Action.createGoto(dest)
creates a new 'GoTo'action.
<static>  
PDFNet.Action.createGotoRemote(file, page_num)
creates a new 'GoToR'action.
<static>  
PDFNet.Action.createGotoRemoteSetNewWindow(file, page_num, new_window)
Creates a new 'GoToR'action.
<static>  
PDFNet.Action.createGotoWithKey(key, dest)
[Documentation Not Yet Added]
<static>  
PDFNet.Action.createHideField(sdfdoc, list_length, field_list)
Creates a new 'Show/Hide Field' action.
<static>  
PDFNet.Action.createImportData(sdfdoc, path)
Creates a new 'Import Data' action.
<static>  
PDFNet.Action.createJavaScript(sdfdoc, script)
Creates a new 'JavaScript' action.
<static>  
PDFNet.Action.createLaunch(sdfdoc, path)
Creates a new 'Launch' action.
<static>  
PDFNet.Action.createResetForm(sdfdoc)
Creates a new 'Reset Form' action.
<static>  
PDFNet.Action.createSubmitForm(url)
creates a new 'SubmitForm'action.
<static>  
PDFNet.Action.createURI(sdfdoc, uri)
Create a new URI action.
 
Executes current action; this will only work for some action types that can be executed only using the information contained in the action object or the associated PDF doc.
 
Executes KeyStrokeAction, this shall be performed when the user modifies a character in a text field or combo box or modifies the selecton in a scrollable list box.
 
 
 
 
 
 
Indicates whether the Action is valid (non-null).
 
Test if the action needs writeLock
 
SetFormActionFlag(flag, value)
Set the value of a given field flag.
Class Detail
PDFNet.Action(id)
Actions are typically what happens when a user clicks on a link or bookmark. Instead of simply jumping to a destination in the document, an annotation or outline item can specify an action for the viewer application to perform, such as launching an application, playing a sound, or changing an annotation's appearance state.
Parameters:
id
Method Detail
{boolean} compare(in_action)
Compares two Action objects for equality.
Parameters:
{Action} in_action
A reference to an existing Action object.
Returns:
{boolean} A promise that resolves to true if the both Actions share the same underlying SDF/Cos object; otherwise false.

{Action} copy()
Copy Constructor
Returns:
{Action} A promise that resolves to an object of type: "Action" (generated documentation)

<static> {Action} PDFNet.Action.create(in_obj)
A constructor. Creates an Action and initializes it using given Cos/SDF object.
Parameters:
{Obj} in_obj
Pointer to the Cos/SDF object.
Returns:
{Action} A promise that resolves to an object of type: "Action" (generated documentation)

<static> {Action} PDFNet.Action.createGoto(dest)
creates a new 'GoTo'action. GoTo action takes the user to the specified Destination view located in the same document.
Parameters:
{Destination} dest
A Destination for the new Action.
Returns:
{Action} A promise that resolves to an object of type: "Action" (generated documentation)

<static> {Action} PDFNet.Action.createGotoRemote(file, page_num)
creates a new 'GoToR'action. A remote go-to action is similar to an ordinary go-to action but jumps to a destination in another PDF file instead of the current file.
Parameters:
{FileSpec} file
The file referred to by the action.
{number} page_num
A page number within the remote document. The first page is numbered 0.
Returns:
{Action} A promise that resolves to an object of type: "Action" (generated documentation)

<static> {Action} PDFNet.Action.createGotoRemoteSetNewWindow(file, page_num, new_window)
Creates a new 'GoToR'action. See the above method for details.
Parameters:
{FileSpec} file
The file referred to by the action.
{number} page_num
A page number within the remote document. The first page is numbered 0.
{boolean} new_window
A flag specifying whether to open the destination document in a new window. If new_window is false, the destination document replaces the current document in the same window, otherwise the viewer application should behave in accordance with the current user preference.
Returns:
{Action} A promise that resolves to an object of type: "Action" (generated documentation)

<static> {Action} PDFNet.Action.createGotoWithKey(key, dest)
[Documentation Not Yet Added]
Parameters:
{string} key
(generated documentation)
{Destination} dest
(generated documentation)
Returns:
{Action} A promise that resolves to an object of type: "Action" (generated documentation)

<static> {Action} PDFNet.Action.createHideField(sdfdoc, list_length, field_list)
Creates a new 'Show/Hide Field' action. A show/hide field action shows or hide certain fields when it's invoked.
Parameters:
{SDFDoc} sdfdoc
the document in which to create the action
{number} list_length
the number of fields to hide
{string} field_list
the list of fields to hide
Returns:
{Action} A promise that resolves to an object of type: "Action" (generated documentation)

<static> {Action} PDFNet.Action.createImportData(sdfdoc, path)
Creates a new 'Import Data' action. An import data action imports form data from a FDF file into a PDF document.
Parameters:
{SDFDoc} sdfdoc
the document in which to create the action
{string} path
the full path of the FDF file
Returns:
{Action} A promise that resolves to an object of type: "Action" (generated documentation)

<static> {Action} PDFNet.Action.createJavaScript(sdfdoc, script)
Creates a new 'JavaScript' action. A javascript action executes a JavaScript script when it's invoked.
Parameters:
{SDFDoc} sdfdoc
the document in which to create the action
{string} script
the JavaScript script to be executed
Returns:
{Action} A promise that resolves to an object of type: "Action" (generated documentation)

<static> {Action} PDFNet.Action.createLaunch(sdfdoc, path)
Creates a new 'Launch' action. A launch action opens up a file using the most appropriate program.
Parameters:
{SDFDoc} sdfdoc
the document in which to create the action
{string} path
the full path of the file to be opened
Returns:
{Action} A promise that resolves to an object of type: "Action" (generated documentation)

<static> {Action} PDFNet.Action.createResetForm(sdfdoc)
Creates a new 'Reset Form' action. A reset form action reset chosen form fields to their default value.
Parameters:
{SDFDoc} sdfdoc
the document in which to create the action
Returns:
{Action} A promise that resolves to an object of type: "Action" (generated documentation)

<static> {Action} PDFNet.Action.createSubmitForm(url)
creates a new 'SubmitForm'action. A submit-form action transmits the names and values of selected interactive form fields to a specified uniform resource locator (URL), presumably the address of a Web server that will process them and send back a response.
Parameters:
{FileSpec} url
A URL file specification giving the uniform resource locator (URL) of the script at the Web server that will process the submission.
Returns:
{Action} A promise that resolves to an object of type: "Action" (generated documentation)

<static> {Action} PDFNet.Action.createURI(sdfdoc, uri)
Create a new URI action. The URI action is typically resolved by opening a URL in the default web browser.
Parameters:
{SDFDoc} sdfdoc
The document in which to create the action.
{string} uri
The uniform resource identifier to resolve, encoded in 7-bit ASCII. A uniform resource identifier (URI) is a string that identifies (resolves to) a resource on the Internet; typically a file that is the destination of a hypertext link, although it can also resolve to a query or other entity. (URIs are described in Internet RFC 2396, Uniform Resource Identifiers (URI).
Returns:
{Action} A promise that resolves to an object of type: "Action" (generated documentation)

Execute()
Executes current action; this will only work for some action types that can be executed only using the information contained in the action object or the associated PDF doc. See also PDFViewCtrl::ExecuteAction()

{KeyStrokeActionResult} executeKeyStrokeAction(data)
Executes KeyStrokeAction, this shall be performed when the user modifies a character in a text field or combo box or modifies the selecton in a scrollable list box. This action checks the added text for validity and reject or modify it.
Parameters:
{KeyStrokeEventData} data
Data that contains previous text, added text,and added position information.
Returns:
{KeyStrokeActionResult} A promise that resolves to an object of type: "KeyStrokeActionResult" (generated documentation)

{Destination} getDest()
Returns:
{Destination} A promise that resolves to the Action's Destination view.

{boolean} GetFormActionFlag(flag)
Parameters:
{number} flag
Action flag to get the value from.
Returns:
{boolean} A promise that resolves to boolean value of the given action flag.

{Obj} getNext()
Returns:
{Obj} A promise that resolves to the next action dictionary, an array of action dictionaries, or NULL if there are no additional actions. Sequences of actions can be chained together. For example, the effect of clicking a link annotation with the mouse might be to play a sound, jump to a new page, and start up a movie. Note that the Next entry is not restricted to a single action but may contain an array of actions, each of which in turn may have a Next entry of its own. The actions may thus form a tree instead of a simple linked list. Actions within each Next array are executed in order, each followed in turn by any actions specified in its Next entry, and so on recursively.

{Obj} getSDFObj()
Returns:
{Obj} A promise that resolves to pointer to the underlying SDF/Cos object.

{number} getType()
Return value enum:
PDFNet.Action.Type = {
	e_GoTo : 0
	e_GoToR : 1
	e_GoToE : 2
	e_Launch : 3
	e_Thread : 4
	e_URI : 5
	e_Sound : 6
	e_Movie : 7
	e_Hide : 8
	e_Named : 9
	e_SubmitForm : 10
	e_ResetForm : 11
	e_ImportData : 12
	e_JavaScript : 13
	e_SetOCGState : 14
	e_Rendition : 15
	e_Trans : 16
	e_GoTo3DView : 17
	e_RichMediaExecute : 18
	e_Unknown : 19
}
Returns:
{number} A promise that resolves to the type of this Action.

{boolean} isValid()
Indicates whether the Action is valid (non-null).
Returns:
{boolean} A promise that resolves to true if this is a valid (non-null) Action; otherwise false.

{boolean} needsWriteLock()
Test if the action needs writeLock
Returns:
{boolean} A promise that resolves to ture if needs, otherwise false

SetFormActionFlag(flag, value)
Set the value of a given field flag.
Parameters:
{number} flag
Action flag to get the value from.
{boolean} value
Boolean to set the value of the flag to. Action flags are currently only used by submit and reset form actions.

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Sep 09 2016 14:32:38 GMT-0700 (PDT)