PDF.js not working on IE9

jfreak53 picture jfreak53 · Sep 21, 2012 · Viewed 15.4k times · Source

Does anyone have any clue how to get PDF.js to work on IE 9? I have tried everything I can think of to get it to work and no go. I have downloaded the hack.js file and tried adding it before and after pdf.js and before and after viewer.js. That didn't work.

I then tried downloading compatability.js, viewer.js and pdf.js from their Demo (Which I can confirm is working 100% in IE9) and put them into my HTML page, no go. I am using their PDF file, which some sites say that some PDFs work and others don't. So I figured if it worked on their site it must work on mine--but no go.

The Demo of theirs works fine, but anytime I try to get mine to work in IE9, whether I use their files or my compiled version, it doesn't work.

Answer

Pavel G. Klukin picture Pavel G. Klukin · Jul 5, 2013

Try to load compatibility.js before pdf.js. Something like this:

  <script type="text/javascript" src="/js/compatibility.js"></script>
  <script type="text/javascript" src="/js/pdf_compr.js"></script>