SetActionLaunchOptions

Actions

Description

Sets the target file, Windows parameters, default directory, operation and window preference of a launch action

Syntax

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

Parameters

ActionIDHandle of an existing 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 the standard open default or 1 for print, while NewWindow is -1 to omit, 0 for false or 1 for true

Launch actions are rejected in PDF/A and PDF/X-6 modes