Some test text!


Opening MS Office documents using JavaScript

Opening an MS Office document is the same as creating a PDF document except that we need to initialize the Office worker.

// Instantiate a Document object.
const licenseKey = 'Insert commercial license key here after purchase';
const source = '/url/to/file.docx';

try {
  // If you are loading the Office file as a Blob, you need pass Blob directly 
  // as a first paramater to createDocument
  const doc = await CoreControls.createDocument(source, { l: licenseKey });
  // The PDF file has been created, you can call APIs of the Document class
} catch (error) {

Get the answers you need: Support


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