API referenceImport & 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.

C
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)

wrappers/dotnet/LumasPdf.cs
public static extern IntPtr pdfGetOpenActionJavaScriptW(IntPtr IPDF);
public static extern IntPtr pdfGetOpenActionJavaScript(IntPtr IPDF);
public static extern IntPtr pdfGetOpenActionJavaScriptA(IntPtr IPDF);
Area
Import & Output APIs
Category

Getters

Exported names

pdfGetOpenActionJavaScriptW pdfGetOpenActionJavaScript pdfGetOpenActionJavaScriptA

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.