We are in the process of updating from version 5 to version 7 of WebViewer. The one issue that we have after doing the upgrade is getting the error "Invalid XOD file: Zip end header data is wrong size!" when trying to load a local file on the fly. I do not get this error when running our code locally - only when running on the server.
The code that we are calling to load the local file is:
self.title = self.constants.appName;
let fileName = (window.orientation === 90 || window.orientation === -90) ? "TapHereToBeginLandscape.xod" : "TapHereToBeginPortrait.xod";
let initialDocUrl = `./assets/files/${fileName}`;
self.webViewer.loadDocument(initialDocUrl, { filename: fileName, streaming: true });
This code has been working fine for a long time in our application - and still works with version 5 of the web viewer and locally with version 7 of the web viewer.
I've tracked the error down to line 219 in HttpPartRetriever. If I refresh our application then the same document loads fine.
I will provide further information by private email to
sup...@pdftron.com with details on how you can replicate this problem on a live staging version of our application.
Can you help with resolving this problem?
Kind regards,
David