API referenceCore SDK

pdfCreateLaunchAction

Create an action that launches an external application or file.

Exported namespdfCreateLaunchAction (bare = ANSI)
AvailabilityPartial — compatibility parameters — see Remarks

Purpose — Create an action that launches an external application or file.

Description — Registers action kind 5 with NewWindow in a and FileName in Text.

Declarations

C
int32_t __stdcall pdfCreateLaunchAction(PPDF IPDF, int32_t OP, const char* FileName, const char* DefDir, const char* Param, BOOL32 NewWindow);
Delphi
function pdfCreateLaunchAction(const IPDF: PPDF; OP: Integer; const FileName, DefDir, Param: PAnsiChar; NewWindow: LongBool): Integer; stdcall; external 'LumasPdf.dll';

Parameters

ParameterTypeDescription
IPDFPPDFInstance handle.
OPIntegerAccepted for ABI compatibility; not read — see Remarks.
FileNamePAnsiCharTarget file/application path — stored and serialized.
DefDirPAnsiCharAccepted for ABI compatibility; not read — see Remarks.
ParamPAnsiCharAccepted for ABI compatibility; not read — see Remarks.
NewWindowBOOL32Stored and serialized.

Return value — 1-based action handle (> 0), or 0 on an invalid handle.

Remarks — compatibility parameters. OP, DefDir, and Param are accepted to match the reference ABI signature but are discarded: only FileName and NewWindow reach the stored action and the serialized /Launch dictionary. If you need a default directory or launch parameters encoded, they are not representable through this call in the current engine. Use pdfCreateLaunchActionEx for the simpler two-argument form with the same effective behavior.

See alsopdfCreateLaunchActionEx

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfCreateLaunchAction(IntPtr IPDF, int OP, [MarshalAs(UnmanagedType.LPStr)] string FileName, [MarshalAs(UnmanagedType.LPStr)] string DefDir, [MarshalAs(UnmanagedType.LPStr)] string Param, [MarshalAs(UnmanagedType.Bool)] bool NewWindow);
Area
Core SDK
Category

Object Creation

Exported names

pdfCreateLaunchAction

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.