Some test text!

Hamburger Icon

Web / Guides

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: Chat with us