SetOutlineJavaScript

JavaScript, Outlines

Description

Specifies the JavaScript to run when the user clicks on the outline item (bookmark).

Syntax

Delphi

function TPDFlib.SetOutlineJavaScript(OutlineID: Integer; Const JavaScript: WideString): Integer;

ActiveX

Function PDFlib::SetOutlineJavaScript(OutlineID As Long, JavaScript As String) As Long

DLL

int DLSetOutlineJavaScript(int InstanceID, int OutlineID, wchar_t * JavaScript);

Parameters

OutlineIDThe ID of the outline as returned by the NewOutline function. Alternatively, use the GetOutlineID function to get a valid outline ID.
JavaScriptThe JavaScript to execute.

Return values

0The OutlineID was invalid
1The JavaScript action was successfully added to the outline ID