| Category | Actions |
|---|
Purpose — Read the script text of a JS action by handle.
Declarations
C
const char* __stdcall pdfGetJavaScriptAction(PPDF IPDF, uint32_t Handle, uint32_t* Len, BOOL32* Unicode);
Delphi
function pdfGetJavaScriptAction(const IPDF: PPDF; Handle: Cardinal; var Len: Cardinal; var Unicode: LongBool): PAnsiChar; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
Handle | Cardinal | Action handle from pdfCreateJSAction. |
Len | Cardinal* | Receives the script length in bytes. |
Unicode | BOOL32* | Always FALSE — this getter reports the script as ANSI regardless of whether it was created via the W (Unicode-encoded via PWideToPdfText) or A variant; the underlying TPDFError-adjacent buffer is a single RawByteString. |
Return value — Pointer to the script text, or NULL if Handle is not a JavaScript (kind 1) action.
Memory & buffers — Engine-owned, valid until the next call to this function on the same instance.
See also — pdfGetJavaScriptActionEx, pdfCreateJSAction
C# (P/Invoke)
wrappers/dotnet/LumasPdf.cs
public static extern IntPtr pdfGetJavaScriptAction(IntPtr IPDF, uint Handle, ref uint Len, [MarshalAs(UnmanagedType.Bool)] ref bool Unicode);
Area
Core SDK
Category
Getters
Exported names
pdfGetJavaScriptAction
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.