Upgrading to V7: Invalid XOD file: Zip end header data is wrong size!

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 support@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,



Thank you for reaching out to us about WebViewer. I tried testing this a bit with version 7.1 of WebViewer but wasn’t able to reproduce the issue you are seeing. An URL to your live staging version would be really helpful for debugging this issue, if you could email us the detail to support@pdftron.com it would help us a lot. Thank you

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

CONFIDENTIALITY NOTICE: This message (and any attachment to it) is intended only for the use of the individual or entity to which it is addressed in the header, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. Any reproduction, distribution, modification or use of the contents of this message (and any attachment to it) by any individual or entity other than the intended recipient is prohibited. If you have received this communication in error, please notify us immediately and delete the original.

Hi Andrew,

I did already send that information a second time (my first email had an incorrect URL). I will send again now.

Kind regards,


I ended up tracking this down to a path issue. I had to change my code to:

let initialDocUrl = ../../files/${fileName};

Thanks for your help.