pdfGetActionHandle
Look up the action handle attached to an object at a given
| Category | Actions |
|---|---|
| Availability | Partial — 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 otAction — not 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
int32_t __stdcall pdfGetActionHandle(PPDF IPDF, TObjType ObjType, uint32_t ObjHandle, uint32_t ActIndex);
function pdfGetActionHandle(const IPDF: PPDF; ObjType: TObjType; ObjHandle, ActIndex: Cardinal): Integer; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
ObjType | TObjType | Only Ord(ObjType)=0 resolves — see Remarks. |
ObjHandle | Cardinal | Not consulted by this build's implementation. |
ActIndex | Cardinal | Only 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 also — pdfGetObjActions
C# (P/Invoke)
public static extern int pdfGetActionHandle(IntPtr IPDF, TObjType ObjType, uint ObjHandle, uint ActIndex);
Getters
pdfGetActionHandle
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.