API referenceCore SDK

pdfCreateGoToRAction

Create a "go to remote" action that opens another PDF file and

Exported namespdfCreateGoToRActionA, pdfCreateGoToRActionW, pdfCreateGoToRAction (bare = ANSI)

Purpose — Create a "go to remote" action that opens another PDF file and jumps to a page in it.

Description — Registers action kind 4 with the target FileName and PageNum. Unlike the Ex variants below, this overload has no DestName parameter — it always targets an explicit page number.

Declarations

C
int32_t __stdcall pdfCreateGoToRAction(PPDF IPDF, const char* FileName, uint32_t PageNum);
int32_t __stdcall pdfCreateGoToRActionA(PPDF IPDF, const char* FileName, uint32_t PageNum);
int32_t __stdcall pdfCreateGoToRActionW(PPDF IPDF, const wchar_t* FileName, uint32_t PageNum);
Delphi
function pdfCreateGoToRAction(const IPDF: PPDF; const FileName: PAnsiChar; PageNum: Cardinal): Integer; stdcall; external 'LumasPdf.dll';
function pdfCreateGoToRActionA(const IPDF: PPDF; const FileName: PAnsiChar; PageNum: Cardinal): Integer; stdcall; external 'LumasPdf.dll';
function pdfCreateGoToRActionW(const IPDF: PPDF; const FileName: PWideChar; PageNum: Cardinal): Integer; stdcall; external 'LumasPdf.dll';

Parameters

ParameterTypeDescription
IPDFPPDFInstance handle.
FileNamestringTarget PDF file path/name (ANSI for the bare/A form, UTF-16 for W).
PageNumCardinalTarget page in the remote file (0-based).

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

See alsopdfCreateGoToRActionEx, pdfCreateGoToEAction

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfCreateGoToRAction(IntPtr IPDF, [MarshalAs(UnmanagedType.LPStr)] string FileName, uint PageNum);
public static extern int pdfCreateGoToRActionW(IntPtr IPDF, [MarshalAs(UnmanagedType.LPWStr)] string FileName, uint PageNum);
public static extern int pdfCreateGoToRActionA(IntPtr IPDF, [MarshalAs(UnmanagedType.LPStr)] string FileName, uint PageNum);
Area
Core SDK
Category

Object Creation

Exported names

pdfCreateGoToRAction pdfCreateGoToRActionW pdfCreateGoToRActionA

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.