DynaPDF Manual - Page 279

Previous Page 278   Index   Next Page 280

Function Reference
Page 279 of 839
SI32 pdfCreateJSAction(
const PPDF* IPDF,
// Instance pointer
const char* Script) // Must be one or more JavaScript functions
This function creates a JavaScript action. A JavaScript Action causes a script to be compiled and
executed by the JavaScript interpreter of Adobe's Acrobat. Depending on the nature of the scripts,
this can cause various interactive form fields in the document to update their values or change their
visual appearances.
The parameter Script must be a valid JavaScript. The function does not check whether the script is
A JavaScript action can be added to a field, page, or to the Catalog object with AddActionToObj().
This function is implemented in an Ansi and Unicode compatible version. Because JavaScript 1.2 is
not Unicode compatible, Unicode encoded scripts are translated to a platform specific encoding
prior to interpretation by the JavaScript engine. This conversion is done by Adobe's Acrobat.
Actions must be added to a PDF object with AddActionToObj().
Return values:
If the function succeeds the return value is the action handle, a value greater or equal zero. If the
function fails the return value is a negative error code.
SI32 pdfCreateLaunchAction(
const PPDF* IPDF,
// Instance pointer
// Kind of operation (open or print the file)
const char* FileName, // File name (required)
const char* DefDir,
// Default directory (can be NULL)
const char* Param,
// Optional parameters (can be NULL)
LBOOL NewWindow)
// Open the file in a new window?
typedef enum
A launch action launches an application or opens or prints a document. Acrobat passes the
parameters of a launch action directly to the API function ShellExecute(). The parameter FileName
can be an absolute or relative file path but relative file paths are preferred.

Previous topic: CreateIndexedColorSpace

Next topic: CreateLaunchActionEx