API referenceCore SDK

pdfCreateGoToRActionEx

GoToR variant that targets a named destination in the remote

Exported namespdfCreateGoToRActionExA, pdfCreateGoToRActionExW

Purpose — GoToR variant that targets a named destination in the remote file instead of a page number.

Description — Registers action kind 4 with GotoPg=0 and the file name in Text; when DestName is non-empty it is stored separately via SetActionDestNameH (not concatenated into the file-name text). Both the A and W exported variants take FileName as PAnsiChar — only DestName switches encoding between the two; this differs from the usual A/W convention where both string parameters switch together. Use pdfCreateGoToRActionExU if the file name itself must be Unicode.

Declarations

C
int32_t __stdcall pdfCreateGoToRActionExA(PPDF IPDF, const char* FileName, const char* DestName, BOOL32 NewWindow);
int32_t __stdcall pdfCreateGoToRActionExW(PPDF IPDF, const char* FileName, const wchar_t* DestName, BOOL32 NewWindow);
Delphi
function pdfCreateGoToRActionExA(const IPDF: PPDF; const FileName: PAnsiChar; DestName: PAnsiChar; NewWindow: LongBool): Integer; stdcall; external 'LumasPdf.dll';
function pdfCreateGoToRActionExW(const IPDF: PPDF; const FileName: PAnsiChar; DestName: PWideChar; NewWindow: LongBool): Integer; stdcall; external 'LumasPdf.dll';

Parameters

ParameterTypeDescription
IPDFPPDFInstance handle.
FileNamePAnsiCharTarget file, ANSI in both variants (see Description).
DestNamestringNamed destination in the remote file; ANSI (Ex A) or UTF-16 (ExW).
NewWindowBOOL32Whether the viewer should open the target in a new window.

Return value — 1-based action handle (> 0), or 0 on an invalid handle. NewWindow is stored but the PDF /NewWindow flag's viewer support is consumer-dependent.

RemarksNewWindow is accepted per-parameter (not swallowed), unlike pdfCreateLaunchAction's OP/DefDir/Param (see that entry) — it is written into the action's stored view state and reaches the serialized file.

See alsopdfCreateGoToRActionExU, pdfCreateGoToRAction

C# (P/Invoke)

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

Object Creation

Exported names

pdfCreateGoToRActionExA pdfCreateGoToRActionExW

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.