API referenceCore SDK

pdfGetGoToAction

Read back a GoTo action's destination page, type, and view

CategoryActions
NoteOne field is lossy — see Remarks

Purpose — Read back a GoTo action's destination page, type, and view parameters.

Declarations

C
BOOL32 __stdcall pdfGetGoToAction(PPDF IPDF, uint32_t Handle, TPDFGoToAction* Action);
Delphi
function pdfGetGoToAction(const IPDF: PPDF; Handle: Cardinal; var Action: TPDFGoToAction): LongBool; stdcall; external 'LumasPdf.dll';

TPDFGoToAction:

Delphi
TPDFGoToAction = record
  StructSize: Cardinal;
  DestPage:   Integer;
  DestPos:    PSingle;   // see Remarks: only 3 of the 4 create-time params
  DestType:   TDestType;
end;

Parameters

ParameterTypeDescription
IPDFPPDFInstance handle.
HandleCardinalAction handle from pdfCreateGoToAction.
ActionTPDFGoToAction*Receives the destination. StructSize is not written by this call.

Return valueTRUE if Handle names a GoTo (kind 0) action; FALSE otherwise (including for a valid handle of a different action kind).

Memory & buffersAction.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 alsopdfCreateGoToAction

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Core SDK
Category

Getters

Exported names

pdfGetGoToAction

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.