AddActionNextLaunchEx

Actions

Description

Appends a launch action with a portable file specification and optional Windows parameters

Syntax

Function TPDFlib.AddActionNextLaunchEx(ActionID: Integer; Const FileName, Parameters, DefaultDirectory: WideString; Operation, NewWindow: Integer): Integer;

Parameters

ActionIDExisting action handle that receives the launch action
FileNameTarget file; it must not be empty and is stored as a portable file specification
ParametersWindows command-line parameters stored in /Win /P; an empty value omits them
DefaultDirectoryDefault working directory stored in /Win /D; an empty value omits it
Operation0 for the standard open behaviour or 1 to store /Win /O /print
NewWindow-1 omits /NewWindow, 0 stores false and 1 stores true

Return values

1The launch action was written with the supplied file, Windows parameters, operation and window preference
0The handle is invalid or not a Launch action, the file name is empty, an operation or window value is out of range, or PDF/A and PDF/X-6 modes are active

Remarks

Operation is 0 for open or 1 for print and NewWindow accepts -1, 0 or 1

The action is not appended when PDF/A or PDF/X-6 mode is active or any value is invalid