显示在IE9一个base64 PDF的解决方法+ [英] Workaround of showing a base64 pdf on IE9+
问题描述
我想一个PDF转换为Base64并显示在浏览器中。
I would like to convert a PDF to base64 and show on browser.
问题是,下面的code适用于Firefox和Chrome
The problem is , the following code works for Firefox and Chrome
<iframe src="data:application/pdf;base64,encodeString></iframe>
但不是在IE 9 +,假设用户是使用Adobe Reader插件,是否有允许嵌入的iframe一个base64 PDF的jQuery插件/解决方法吗?谢谢
But not in IE 9 + , suppose the user is using adobe reader plugin, are there any jquery plugin/workaround that allow embed a base64 pdf on iframe? thanks
推荐答案
当你已经注意到了,Internet Explorer不支持使用数据URI作为的IFRAME的来源。这种情况的唯一解决方法是从一个HTTP / HTTPS或FTP URI回报您的PDF内容,并用其作为IFRAME的来源。
As you've noticed, Internet Explorer does not support the use of DATA URIs as the source of IFRAMEs. The only workaround for this is to return your PDF content from a HTTP/HTTPS or FTP URI and use that as the source of the IFRAME.
这篇关于显示在IE9一个base64 PDF的解决方法+的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!