Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help with PDF not rendering correctly in pdf.js

474 views
Skip to first unread message

Greg Humphreys

unread,
Apr 1, 2013, 8:58:49 PM4/1/13
to dev-p...@lists.mozilla.org
Hi everyone -- enclosed is a PDF generated by ReportLab that renders
correctly in every single PDF rendering application I can get my hands on
*except* pdf.js, which not only says that the document may not be rendered
correctly, but also produces a blank page.

The stack trace I get (both from the live demo as well as the tarball I
download and run locally) is:

PDF.js v0.7.425 (build: 77997f6)
Message: Bad encoding in flate stream
Stack: Error: Bad encoding in flate stream
at error (http://mozilla.github.com/pdf.js/build/pdf.js:661:9)
at Object.FlateStream_getCode [as getCode] (
http://mozilla.github.com/pdf.js/build/pdf.js:32051:9)
at Object.FlateStream_readBlock [as readBlock] (
http://mozilla.github.com/pdf.js/build/pdf.js:32202:24)
at Object.DecodeStream_getBytes [as getBytes] (
http://mozilla.github.com/pdf.js/build/pdf.js:31776:16)
at Object.PDFImage_getImageBytes [as getImageBytes] (
http://mozilla.github.com/pdf.js/build/pdf.js:27647:25)
at Object.PDFImage_fillRgbaBuffer [as fillRgbaBuffer] (
http://mozilla.github.com/pdf.js/build/pdf.js:27590:27)
at Object.PDFImage_getImageData [as getImageData] (
http://mozilla.github.com/pdf.js/build/pdf.js:27642:12)
at http://mozilla.github.com/pdf.js/build/pdf.js:14962:36
at <error: illegal access>

This is preventing users of my site from seeing their content in the latest
version of Firefox, which is obviously a bummer and pretty much causing us
to put up "We notice that you're using Firefox, sorry this stuff isn't
going to work, please either save the PDF or switch to some other browser"
type messages, which I'd rather not do.

I spent a little time trying to debug pdf.js myself, but alas my time is a
limited and I made no progress.

Any insight / fixes from you guys would be most appreciated.

--
Greg Humphreys

Yury Delendik

unread,
Apr 2, 2013, 12:10:43 PM4/2/13
to Greg Humphreys
Hello Greg,

First step would be to open an issue at
https://github.com/mozilla/pdf.js/issues or
https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox&component=PDF+Viewer

Also, provide link to the example document that reproduces the problem.

Thanks.
0 new messages