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

45 views
Skip to first unread message

David Compton

unread,
Sep 28, 2020, 4:49:24 PM9/28/20
to PDFTron WebViewer
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

Andrew Yip

unread,
Sep 30, 2020, 1:08:25 PM9/30/20
to PDFTron WebViewer

Hi,

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 sup...@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. 

David Compton

unread,
Oct 1, 2020, 11:03:03 AM10/1/20
to PDFTron WebViewer on behalf of Andrew Yip
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,

David

--
You received this message because you are subscribed to the Google Groups "PDFTron WebViewer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pdfnet-webview...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pdfnet-webviewer/6ce9bea5-f3fd-447e-b88f-552a9bd74c8fn%40googlegroups.com.


--

David Compton

unread,
Oct 19, 2020, 7:30:47 PM10/19/20
to PDFTron WebViewer

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.

David
Reply all
Reply to author
Forward
0 new messages