API referenceCore SDK

pdfGetActionHandle

Look up the action handle attached to an object at a given

CategoryActions
AvailabilityPartial — only one (ObjType, ActIndex) combination is wired — see Remarks

Purpose — Look up the action handle attached to an object at a given event/attachment index.

Description — In this build the only combination that resolves to anything is ActIndex=0 with ObjType equal to the TObjType ordinal 0. Per Lumas.Pdf.Types.TObjType (otAction, otAnnotation, otBookmark, otCatalog, otField, otPage, otPageLink), ordinal 0 is otActionnot otCatalog (ordinal 3), despite the implementation's own comment describing this path as "the document's catalog /OpenAction". If you pass otCatalog expecting to read back the document open-action, you get 0 (not found); the call only succeeds when Ord(ObjType) = 0. Every other (ObjType, ActIndex) combination returns 0 unconditionally — this getter does not yet consult the general per-object attachment table used by pdfGetObjActionCount/pdfGetObjActions.

Declarations

C
int32_t __stdcall pdfGetActionHandle(PPDF IPDF, TObjType ObjType, uint32_t ObjHandle, uint32_t ActIndex);
Delphi
function pdfGetActionHandle(const IPDF: PPDF; ObjType: TObjType; ObjHandle, ActIndex: Cardinal): Integer; stdcall; external 'LumasPdf.dll';

Parameters

ParameterTypeDescription
IPDFPPDFInstance handle.
ObjTypeTObjTypeOnly Ord(ObjType)=0 resolves — see Remarks.
ObjHandleCardinalNot consulted by this build's implementation.
ActIndexCardinalOnly 0 resolves.

Return value — The catalog open-action handle when Ord(ObjType)=0 and ActIndex=0 (whatever was registered as /OpenAction, 0 if none was set); 0 in every other case.

Remarks — known limitation. For general per-object action enumeration (fields, annotations, bookmarks with multiple attached actions/events), use pdfGetObjActionCount + pdfGetObjActions instead, which do walk the full attachment table.

See alsopdfGetObjActions

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfGetActionHandle(IntPtr IPDF, TObjType ObjType, uint ObjHandle, uint ActIndex);
Area
Core SDK
Category

Getters

Exported names

pdfGetActionHandle

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.