pdfCreateGoToRAction
Create a "go to remote" action that opens another PDF file and
| Exported names | pdfCreateGoToRActionA, 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
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);
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
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
FileName | string | Target PDF file path/name (ANSI for the bare/A form, UTF-16 for W). |
PageNum | Cardinal | Target page in the remote file (0-based). |
Return value — 1-based action handle (> 0), or 0 on an invalid handle.
See also — pdfCreateGoToRActionEx, pdfCreateGoToEAction
C# (P/Invoke)
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);
Object Creation
pdfCreateGoToRAction
pdfCreateGoToRActionW
pdfCreateGoToRActionA
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.