Invalid XOD file: Zip end header data is wrong size! with PDF and XOD

536 views
Skip to first unread message

Fernando Azarías

unread,
Oct 30, 2017, 1:00:40 PM10/30/17
to PDFTron WebViewer
Hi, We have got a project with Laravel 5.5 with WebViewer. When I open a pdf or xod the webwiever show it:
"Invalid XOD file: Zip end header data is wrong size!"

 So how can I resolve this problem?

Regards
xod.png
pdf.png

Justin Jung

unread,
Oct 31, 2017, 3:23:54 PM10/31/17
to PDFTron WebViewer
Hello,

For your xod documents, it appears that your server isn't handling the range requests for the documents properly. Instead, it is returning the entire file. You could load the file by setting streaming: true, however we highly recommend handling range requests properly or you may run into performance & memory problems for larger documents.
See this tutorial for more information about the streaming option: https://www.pdftron.com/webviewer/demo/tutorials/streaming-option.html

For your pdf documents, it looks like the file path doesn't have an extension, so WebViewer assumes that it's a xod file. You will need to explicitly tell WebViewer that it's a pdf by passing the option documentType: "pdf" when instantiating.

Justin Jung
Software Developer
PDFTron Systems Inc.
Reply all
Reply to author
Forward
0 new messages