pdfCreateNamedAction
Create one of the four standard viewer navigation actions
Purpose — Create one of the four standard viewer navigation actions (next/previous/first/last page).
Description — Registers action kind 2 with the PDF standard name string for Action: 0→"NextPage", 1→"PrevPage", 2→"FirstPage", 3→"LastPage". Any other value is treated as 0 ("NextPage") — there is no failure path for an out-of-range Action.
Declarations
int32_t __stdcall pdfCreateNamedAction(PPDF IPDF, int32_t Action);
function pdfCreateNamedAction(const IPDF: PPDF; Action: Integer): Integer; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
Action | Integer | 0=NextPage, 1=PrevPage, 2=FirstPage, 3=LastPage; other values silently map to NextPage. |
Return value — 1-based action handle (> 0), or 0 on an invalid handle.
Remarks — This 0..3 numbering is not the same as the TNamedAction enum ordinal you get back from pdfGetNamedAction's Action.AType (which is looked up by the resulting name string, and has a different ordinal order) — see that entry for the verified mapping table.
C# (P/Invoke)
public static extern int pdfCreateNamedAction(IntPtr IPDF, int Action);
Object Creation
pdfCreateNamedAction
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.