API reference › Import & Output APIs
pdfGetOpenActionJavaScript
If the document's OpenAction is a JavaScript action, return
Purpose — If the document's OpenAction is a JavaScript action, return its script text.
Description — The stored PDF text string is decoded (UTF-16BE with BOM, or Latin-1 for ANSI-created actions) and returned as an instance-owned string.
const char* __stdcall pdfGetOpenActionJavaScriptA(PPDF IPDF); /* bare = ANSI */
const wchar_t* __stdcall pdfGetOpenActionJavaScriptW(PPDF IPDF);
Return value — Script text, or NULL when no open action is set / it is not a JavaScript action. The pointer stays valid until the next string-returning call on the same instance.
C# (P/Invoke)
public static extern IntPtr pdfGetOpenActionJavaScriptW(IntPtr IPDF);
public static extern IntPtr pdfGetOpenActionJavaScript(IntPtr IPDF);
public static extern IntPtr pdfGetOpenActionJavaScriptA(IntPtr IPDF);
Getters
pdfGetOpenActionJavaScriptW
pdfGetOpenActionJavaScript
pdfGetOpenActionJavaScriptA
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.