Xojo Conferences

DynaPDF Manual - Page 251

Previous Page 250   Index   Next Page 252

Function Reference
Page 251 of 767
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.
The parameter DefDir defines a default directory in which the file should be searched. The parameter
Param defines an optional parameter string which can be passed to the application. This parameter
should be omitted if the FileName designates a document. The parameters DefDir and Param are both
optional, they can be NULL. See also ShellExecute() of your Windows API reference for further
The last parameter NewWindow specifies whether the file should be opened in a new window or not.
This parameter is ignored if the file is not a PDF file.
Adobe's Acrobat displays a warning before executing a launch action. 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.

Previous topic: CreateLaunchAction

Next topic: CreateNamedAction