Print to PDFs Programmatically Using JavaScript
In addition to using the standard print button from the main toolbar, printing can be managed programmatically via the API.
PSPDFKit for Web supports two instance methods for starting and aborting a print task:
PSPDFKit.load(configuration).then((instance) => { instance.print(); instance.abortPrint(); });
Note that abortPrint
is only available for the PSPDFKit.PrintMode.DOM
mode.