const char* __stdcall pdfGetJSFields(PPDF IPDF);
function pdfGetJSFields(const IPDF: PPDF): PAnsiChar; stdcall;
Purpose. Retrieve the fields-JSON output produced by the SDK's most recent JavaScript execution — the sibling accessor to pdfGetJSResult/pdfGetJSConsole (result value / console output), scoped to whichever field-related JSON the executed script emitted.
Description. A pure buffer accessor (JSFieldsPtr): returns nil if FJSFieldsBuf is empty, else a pointer into that buffer. FJSFieldsBuf is populated as one of three sibling out-parameters (FJSResultBuf/FJSFieldsBuf/FJSConsoleBuf) by a single shared LumasRunJS call made when JavaScript is executed against the document — this getter only ever reflects the most recent such execution; calling it before any script has run returns nil, and it is not per-field addressable (despite the "Fields" name, there is no by-field-handle overload — the content and shape of the JSON is entirely up to whatever the executed script produced).
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Return value. The most recent JS execution's fields-JSON buffer (transient — valid until the next JS execution or document close); nil if no script has run yet, or the last run produced no fields-JSON output.
C# (P/Invoke)
public static extern IntPtr pdfGetJSFields(IntPtr IPDF);
Getters
pdfGetJSFields
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.