mozilla / pdf.js

PDF Reader in JavaScript
https://mozilla.github.io/pdf.js/
Apache License 2.0
48.63k stars 10k forks source link

PDF not rendered on IE9/10 but works fine on scroll using pdf.js hosted on tomcat server and invoked from a standalone html #4754

Closed deepak005 closed 10 years ago

deepak005 commented 10 years ago

I have a standalone html file which has a pdf inside it as an hidden field with base64 encoding.

Pdf.js is hosted inside an tomcat server and is accessed from the html.

The html renders the pdf fine on chrome and firefox, but in IE it shows only the top headers and a blank page.

when we scroll the pdf is rendered. This is the issue.

Can someone please help on this.

issue_1

PDFJS.version = '0.8.1181'; PDFJS.build = '31ea4e0';

Script - logs

LOG: Warning: Setting up fake worker. LOG: Error: Invalid XRef stream LOG:
LOG: Warning: Unsupported feature "unknown" LOG: undefined LOG: Warning: Indexing all PDF objects LOG: PDF 87e26f7ce40a31ea6a9f11c985ab1b6 [1.6 Acrobat Distiller 8.1.0 (Windows) / Adobe LiveCycle Designer 8.0](PDF.js: 0.8.1181)

No more logs when we scroll and the pdf appears.

Thanks

Deepak

yurydelendik commented 10 years ago

Can you provide link to the PDF you are talking about? Also, 0.8.1181 is older version, could you try a newer version, e.g. 1.0.21?

yurydelendik commented 10 years ago

PDF gives a hint "Error: Invalid XRef stream " and tries to recover the document "Indexing all PDF objects ". Looks like your conversion from base64 does not work in IE9/10 properly.

deepak005 commented 10 years ago

using 1.0.21 seems to have fixed the rendering issue. Thanks for the help.