How to load byte array of docx/excel/ppt file fetched from web api in web viewer

Product: WebViewer

Product Version: 8.9

Please give a brief summary of your issue:
Can you give code sample to convert byte array to docx/ppt/xlsx angular

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)

Please provide a link to a minimal sample where the issue is reproducible:


Thank you for contacting WebViewer Support. Can I get some more information on what you are doing? What did you mean by “convert byte array to docx/ppt/xlsx angular” ?

For loading byte array into WebViewer you can use the loadDocument API and pass in an extension for the document type. You can do something like the following

Webviewer({}, document.getElementById('viewer')).then(async (instance) => {
  const { documentViewer  } = instance.Core;

  .then(response => response.blob())
  .then(responseBlob => {
    documentViewer.loadDocument(responseBlob, { fileName: 'test.docx', extension: 'docx' });

You can find out more about opening documenting here

For converting documents, WebViewer is mainly able to convert office files to PDF (it’ll download the file as PDF). For converting PDF to docx/ppt/xlsx, we have that feature in our desktop SDKs. You can send a PDF to the server and convert the document server side. The ability to convert PDF to office formats on the client side, is something we have in our backlog but we don’t have a timeline for it currently

Let me know if the above help or if you want me to clarify something

Best Regards,
Andrew Yip
Software Developer
PDFTron Systems, Inc.