OfficeWorker and mime type errors

Product: WebViewer

Product Version:

Please give a brief summary of your issue:
WebViewer works perfectly running locally, throws errors when deployed to Azure

Please describe your issue and provide steps to reproduce it:
We have used WebViewer successfully to display an Excell file in the homepage of a React app running locally. The local dev environment is Windows 10 and VS Code running the app at localhost:3000. The WebViewer instance works flawlessly and displays an Excel file exactly as expected.

Here is a code snippet of how the WebViewer is being instantiated in the React app:

WebViewer({
        path: "webviewer"
    }, document.getElementById("pdftron-viewer")).then(instance => {
    const arr = new Uint8Array(arrayBuffer);
    console.log("created array");
    const blob = new Blob([arr], { type: 'application/vnd.ms-excel' });
    console.log("created blob");
    instance.UI.setHeaderItems(header => {
        header.update([]);
        console.log("updated header");
    });
    instance.UI.disableElements(['ribbons']);
    instance.UI.disableElements(['toolbarGroup-Edit']);
    instance.UI.loadDocument(blob, { filename: 'preview.xlsx' });
    const { documentViewer } = instance.Core;
    documentViewer.zoomTo(0.5);
    documentViewer.addEventListener('documentLoaded', () => {
        // perform document operations
        console.log("doc loaded");
        setModalOptions({ ...modalOptions, visible: false, loading: false});
    });
});

The problem occurs when the same app is deployed to Azure as an app service. When the WebViewer is instantiated we see several errors in the console:

I have followed the guide linked in the errors referencing the .mem MIME type. That MIME type and others have been manually added to this app’s web.config but doing so has not fixed the problem.

Curious if anyone has seen this before?

Are there any known issues with running WebViewer in a React app in Azure?

Is this a limitation of trying PDFTron for free? We are interested in purchasing a license but need to confirm that this problem will be resolved first.

Thanks for your help!

Hello curt.walker,

Please see the response on stackoverflow:

Best Regards,
Carlo Mendoza
Software Developer
PDFTron Systems, Inc.