Invalid XOD file: Zip end header data is wrong size

335 views
Skip to first unread message

David Compton

unread,
Nov 7, 2016, 1:45:04 PM11/7/16
to PDFTron WebViewer

I am trying to use the WebViewer in a new Ionic 2 project.  I try to setup the viewer using the code below in the platform.ready() event.

setupWebViewer() {
    var viewerElement = document.getElementById("viewer");
    this.webViewer = new PDFTron.WebViewer({
        type: "html5",
        path: "assets/pdftron/",
        initialDoc: "/assets/pdftron/GettingStarted.xod",
        documentId: "GettingStarted",
        enableAnnotations: true,
        streaming: false,
        mobileRedirect: false
    }, viewerElement);
  }

The viewer initializes, however I get the following error:  "Invalid XOD file: Zip end header data is wrong size!".  I'm just trying this out in the browser using "ionic serve".  I have not tried running it on a real device as yet.

Can you advise what I need to do to get the document to load correctly.

Kind regards,

David

Matt Parizeau

unread,
Nov 9, 2016, 5:21:07 PM11/9/16
to PDFTron WebViewer
Hi David,

I tried creating a new Ionic project and it seems to be working for me when running with "ionic serve". I've attached the "www" folder so you can compare and see if there's anything different that you're doing.

Matt Parizeau
Software Developer
PDFTron Systems Inc.
www.zip
Reply all
Reply to author
Forward
0 new messages