使用 PDF.js 将 PDF 静态转换为 HTML [英] Use PDF.js to statically convert a PDF to HTML

查看:163
本文介绍了使用 PDF.js 将 PDF 静态转换为 HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

PDF.js 是 Mozilla 的最新库,是一个完全用 Javascript 编写的基于标准的 PDF 渲染器.目前您无法访问生成的 HTML,该库只能用作查看器.是否可以使用 PDF.js 将 PDF 静态转换为其等效的 HTML?考虑到在浏览器中呈现,它必须是HTML+CSS,并且JS将仅用于导航.

PDF.js is the latest library from Mozilla, and is a standards-based PDF renderer that is written entirely in Javascript. Currently you cannot access the generated HTML, and the library can only be used as a viewer. Is it possible to use PDF.js to statically convert a PDF to its HTML equivalent? Considering it renders in a browser, it must be HTML+CSS, and the JS would be used only for navigation.

将其转换为 HTML 后,我计划使用我们现有的 HTML 工作流程来导入/索引/使用该页面,就像它是一个普通的 HTML 网页一样.

After converting it to HTML I plan to use our existing HTML workflow to import/index/consume the page as if it were an ordinary HTML webpage.

推荐答案

注意:这是针对原始问题,以及针对可能正在访问此以获得相关帮助的其他人,就像我的情况一样.;)

Note: this is for the original question, as well as for others who may be visiting this for related help, as was the case with me. ;)

答案:
您可以尝试:Popplerpdf2htmlEX这是基于 Poppler 的.

Answer:
You may try: Poppler or pdf2htmlEX which is based on Poppler.

我建议您查看 pdf2htmlEX 文档,它也有很好的 对比表.

I'd recommend looking at the pdf2htmlEX documentation it also has as very good comparison table.

这篇关于使用 PDF.js 将 PDF 静态转换为 HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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