AddActionNextJavaScriptA

JavaScript, Annotations and hotspot links

Description

The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to AddActionNextJavaScript and string arguments are interpreted using the current SetAnsiMode code page

Reference page for AddActionNextJavaScript; The function belongs to JavaScript, Annotations and hotspot links and keeps all identifiers exactly as shown

Syntax

Delphi

Function DLAddActionNextJavaScriptA(InstanceID, ActionID: Integer; JavaScript: PAnsiChar): Integer;

DLL

int DLAddActionNextJavaScriptA(int InstanceID, int ActionID, const char * JavaScript);

Return values

ActionIDAn ActionID as returned by GetAnnotActionID, GetOutlineActionID, or GetFormFieldActionID
JavaScriptThe JavaScript source to execute after the primary action

Return values

0The ActionID was invalid, the JavaScript string was empty, or the selected document is in PDF/A mode
1The JavaScript next-action was appended successfully

See also

The function writes the PDF action /Next entry without replacing the primary action, preserving any existing chained actions

Use GetActionNextCount and GetActionNextInfo to inspect chained actions after creation or after loading an existing PDF