MIME encoding of a PDF file in an HTML page
Can a PDF be MIME encoded and included as part of the payload of an HTML page? This site shows that you can include a MIME-encoded image or a CSS in an HTML page: http://www.greywyvern.com/code/php/binary2base64/ -- but I don't know what the markup would be for an encoded PDF included in an HTML page. Thanks.
I've tried it with iframe
and embed
, worked in chrome, opera and safari, no ie or ff
<iframe src="data:application/pdf;base64,base64encodedpdf"></iframe>
<embed src="data:application/pdf;base64,base64encodedpdf">
http://jsfiddle.net/yLx2W/
http://jsfiddle.net/yLx2W/1/
Maybe with some tweaking you can get them to work for ff and maybe ie.
链接地址: http://www.djcxy.com/p/36466.html下一篇: HTML页面中PDF文件的MIME编码