在 HTML 中嵌入 PDF 的推荐方法?
问题描述:
在 HTML 中嵌入 PDF 的推荐方法是什么?
What is the recommended way to embed PDF in HTML?
- iFrame?
- 对象?
- 嵌入?
Adobe 对此有何评价?
What does Adobe say itself about it?
就我而言,PDF 是即时生成的,因此无法在刷新之前将其上传到第三方解决方案.
In my case, the PDF is generated on the fly, so it can't be uploaded to a third-party solution prior to flushing it.
答
可能最好的方法是使用 PDF.JS 库.这是一个纯粹的 HTML5/JavaScript 用于 PDF 文档的渲染器,无需任何第三方插件.
Probably the best approach is to use the PDF.JS library. It's a pure HTML5/JavaScript renderer for PDF documents without any third-party plugins.