pdfGetGoToAction
Read back a GoTo action's destination page, type, and view
| Category | Actions |
|---|---|
| Note | One field is lossy — see Remarks |
Purpose — Read back a GoTo action's destination page, type, and view parameters.
Declarations
BOOL32 __stdcall pdfGetGoToAction(PPDF IPDF, uint32_t Handle, TPDFGoToAction* Action);
function pdfGetGoToAction(const IPDF: PPDF; Handle: Cardinal; var Action: TPDFGoToAction): LongBool; stdcall; external 'LumasPdf.dll';
TPDFGoToAction:
TPDFGoToAction = record
StructSize: Cardinal;
DestPage: Integer;
DestPos: PSingle; // see Remarks: only 3 of the 4 create-time params
DestType: TDestType;
end;
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
Handle | Cardinal | Action handle from pdfCreateGoToAction. |
Action | TPDFGoToAction* | Receives the destination. StructSize is not written by this call. |
Return value — TRUE if Handle names a GoTo (kind 0) action; FALSE otherwise (including for a valid handle of a different action kind).
Memory & buffers — Action.DestPos points at an engine-owned 3-element Single array, valid until the next call to this function.
Remarks — lossy round-trip. pdfCreateGoToAction accepts four Double view parameters (a, b, c, d), but only the first three (a, b, c) are retained and returned here, downcast to Single. For dtFit_Rect destinations — which use all four (left, bottom, right, top) — d (top) is not recoverable through this getter; only the creation-time call knew it. Plan accordingly if you round-trip GoTo actions through this API.
See also — pdfCreateGoToAction
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Getters
pdfGetGoToAction
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.