Some test text!

menu

Create PDF document using JavaScript

Creating a PDF document is similar to creating a XOD document except it requires a few more steps: we need to initialize the PDF worker based on the backend type for the browser we are using.

Starting 6.0 version of WebViewer, there is no need to initialize the PDF worker.
// Instantiate a Document object.
const licenseKey = 'Insert commercial license key here after purchase';
const doc = await CoreControls.createDocument('/path/file.pdf', { l: licenseKey });

// doc is Document instance and ready use

Get the answers you need: Support

close

Free Trial

Get unlimited trial usage of PDFTron SDK to bring accurate, reliable, and fast document processing capabilities to any application or workflow.

Select a platform to get started with your free trial.

Unlimited usage. No email address required.

Join our live demo to learn about use cases & capabilities for WebViewer

Learn more
close