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 Core.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

Upcoming Webinar: PDFTron SDK Tech Review | Nov 29, 2022 at 2 pm ET


The Platform


© 2022 PDFTron Systems Inc. All rights reserved.


Terms of Use