在 HTML 中嵌入 PDF 的推荐方法? [英] Recommended way to embed PDF in HTML?

查看:43
本文介绍了在 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.

在线演示:https://mozilla.github.io/pdf.js/web/viewer.html

GitHub:https://github.com/mozilla/pdf.js

这篇关于在 HTML 中嵌入 PDF 的推荐方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆