MIME encoding of a PDF file in an HTML page

后端 未结 1 1205
小鲜肉
小鲜肉 2020-12-17 11:09

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

相关标签:
1条回答
  • 2020-12-17 11:27

    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.

    0 讨论(0)
提交回复
热议问题