Can anyone explain me why this code don't work in IE? In Chrome everything works just fine.
Part of my Html:
<head>
<script type='text/javascript' src="//code.jquery/jquery-1.9.1.js"></script>
<script type='text/javascript' src=".js"></script>
<script type='text/javascript' src=".js"</script>
</head>
<body>
<div id="pdfContainer" class = "pdf-content"></div>
</body>
Full code and example that works on Chrome: /
Can anyone explain me why this code don't work in IE? In Chrome everything works just fine.
Part of my Html:
<head>
<script type='text/javascript' src="//code.jquery./jquery-1.9.1.js"></script>
<script type='text/javascript' src="http://vivin/pub/pdfjs/pdf.js"></script>
<script type='text/javascript' src="http://vivin/pub/pdfjs/textlayerbuilder.js"</script>
</head>
<body>
<div id="pdfContainer" class = "pdf-content"></div>
</body>
Full code and example that works on Chrome: http://jsfiddle/vivin/RjqUf/
Share Improve this question asked Apr 26, 2014 at 14:09 maxus182maxus182 1611 gold badge1 silver badge10 bronze badges2 Answers
Reset to default 5I've figured out what my problem was. I replaced the pdf.js with pdf.min.js and now everything works fine in both Explorer 10 and Chrome. Don't know exactly why, but it works.
the reason it doesnt work is because pdf.js is not supported by ie9 and below https://github./mozilla/pdf.js/wiki/Frequently-Asked-Questions#what-browsers-are-supported
if you want to force users to embed pdf in ie7,8,9 you can do this
<embed src="../pdfFileName.pdf" class = "pdf-content">
.pdf-content {your style and size}
this works if they have somekind of pdf reader
if you want fallback you can use <object>
tag
there is a discussion EMBED vs. OBJECT about embeding vs object