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

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

问题描述

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



将其转换为HTML后,我打算使用现有的HTML工作流程来导入/索引/使用页面,就像它是一个普通的HTML网页一样。 b $ b

解决方案

注意:这是针对原始问题的,也适用于其他可能访问相关帮助的人员,例如我的情况。 ;)

答案:

您可以试试: Poppler a>或基于Poppler的 pdf2htmlEX



我会建议查看 pdf2htmlEX文档,它也有非常好的比较表

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.

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. ;)

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

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

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

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