JavaScriptProvider

Handles all JavaScript related operations on the owning document. Retrieve it with com.pspdfkit.document.PdfDocument.javaScriptProvider

Properties

Link copied to clipboard

Controls whether JavaScript processing is enabled for this document. Defaults to false. Note: Processing JavaScript can be slow for documents with a large number of document providers or scripts. Disabling in most cases will not have any negative effects.

Functions

Link copied to clipboard

Loads and evaluates top level JavaScript scripts that are associated with the document. Note: this call may block for a while and should not be invoked on the main thread.

Link copied to clipboard
abstract suspend fun executeDocumentLevelScriptsAsync()

Loads and evaluates top level JavaScript scripts that are associated with the document, suspending until they have been executed. Runs the work off the calling thread.