我正在尝试将 PDF 嵌入到 HTML 文档中,但这似乎只适用于 Chrome。其他浏览器似乎需要插件或需要用户单击不是我想要的链接。这是我尝试过的:
<object data="pdfFiles/interfaces.pdf" type="application/pdf">
<embed src=" pdfFiles/interfaces.pdf" type="application/pdf"> </embed>
alt :<a href="pdfFiles/interfaces.pdf">
</object>
最佳答案
这是您可以用于每个浏览器的代码:
<embed src="pdfFiles/interfaces.pdf" width="600" height="500" alt="pdf" pluginspage="http://www.adobe.com/products/acrobat/readstep2.html">
在 firefox 和 chrome 上测试
关于html - 如何嵌入 PDF?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14690000/