DocJavaScriptAction

Document properties, JavaScript

Description

This function is used to add JavaScript to document events. This JavaScript will be executed when, for example, the document is closed or printed.

Syntax

Delphi

function TPDFlib.DocJavaScriptAction(Const ActionType, JavaScript: WideString): Integer;

ActiveX

Function PDFlib::DocJavaScriptAction(ActionType As String, JavaScript As String) As Long

DLL

int DLDocJavaScriptAction(int InstanceID, wchar_t * ActionType, wchar_t * JavaScript);

Parameters

ActionTypeThe event to attach the JavaScript to: "WC" = Will close "WS" = Will save "DS" = Did save "WP" = Will print "DP" = Did print
JavaScriptThe JavaScript to attach to the event.

Return values

0The specified ActionType was not valid The JavaScript was added successfully
1