AddGlobalJavaScript
Document properties, JavaScript
Description
Adds JavaScript to a global location in the document.
For example, this allows functions to be defined which can then be called from JavaScript attached to events.
Syntax
Delphi
function TPDFlib.AddGlobalJavaScript(Const PackageName, JavaScript: WideString): Integer;ActiveX
Function PDFlib::AddGlobalJavaScript(PackageName As String, JavaScript As String) As LongDLL
int DLAddGlobalJavaScript(int InstanceID, wchar_t * PackageName, wchar_t * JavaScript);Parameters
| PackageName | The name to store the JavaScript under. If any JavaScript is already stored under this name it will be removed and the new JavaScript will be stored in its place. |
|---|---|
| JavaScript | The JavaScript to store globally under the specified package name. |
Return values
| 0 | The PackageName was empty |
|---|---|
| 1 | The JavaScript was stored successfully |