THotPDF.AddLoadedDocumentJavaScript Method

Adds a named script entry to the named JavaScript collection of the loaded PDF document, making it execute automatically at the document level

Declaration

procedure AddLoadedDocumentJavaScript(const AName, ABody: AnsiString);

Unit

HPDFDoc

Parameters

NamePurpose
ANameThe unique name of the script entry, used to identify and reference this script in the name tree; it can also be deleted by name via RemoveLoadedJavaScript
ABodyThe complete body code of the JavaScript script, executed by the PDF reader when the document is opened

Usage notes

Related APIs