pdfGetJavaScriptAction2
Read the script text and triggering event of the ActIndex-th
| Category | Actions |
|---|
Purpose — Read the script text and triggering event of the ActIndex-th attached action on (ObjType, ObjHandle), if it is a JavaScript action.
Declarations
C
const char* __stdcall pdfGetJavaScriptAction2(PPDF IPDF, TObjType ObjType, uint32_t ObjHandle, uint32_t ActIndex, uint32_t* Len, BOOL32* Unicode, TObjEvent* Event);
Delphi
function pdfGetJavaScriptAction2(const IPDF: PPDF; ObjType: TObjType; ObjHandle, ActIndex: Cardinal; var Len: Cardinal; var Unicode: LongBool; var Event: TObjEvent): PAnsiChar; stdcall; external 'LumasPdf.dll';
TObjEvent (from Lumas.Pdf.Types):
Delphi
TObjEvent = (oeNoEvent, oeOnOpen, oeOnClose, oeOnMouseUp, oeOnMouseEnter,
oeOnMouseExit, oeOnMouseDown, oeOnFocus, oeOnBlur, oeOnKeyStroke,
oeOnFormat, oeOnCalc, oeOnValidate, oeOnPageVisible,
oeOnPageInVisible, oeOnPageOpen, oeOnPageClose, oeOnBeforeClosing,
oeOnBeforeSaving, oeOnAfterSaving, oeOnBeforePrinting,
oeOnAfterPrinting);
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
ObjType | TObjType | Owning object's type. |
ObjHandle | Cardinal | Owning object's handle. |
ActIndex | Cardinal | Zero-based index into the attached-action list. |
Len | Cardinal* | Receives script length. |
Unicode | BOOL32* | Always FALSE — same caveat as pdfGetJavaScriptAction. |
Event | TObjEvent* | Receives the triggering event stored for this attachment. |
Return value — Script pointer, or NULL if ActIndex is out of range for this object or the action at that index is not JavaScript.
See also — pdfGetObjActions
C# (P/Invoke)
wrappers/dotnet/LumasPdf.cs
public static extern IntPtr pdfGetJavaScriptAction2(IntPtr IPDF, TObjType ObjType, uint ObjHandle, uint ActIndex, ref uint Len, [MarshalAs(UnmanagedType.Bool)] ref bool Unicode, ref TObjEvent @Event);
Area
Core SDK
Category
Getters
Exported names
pdfGetJavaScriptAction2
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.