xgbzsc

 

摘要: 先上Demo:http://coolwanglu.github.com/pdf2htmlEX/demo/demo.html还有大家可能会关心的CJKhttp://coolwanglu.github.com/pdf2htmlEX/demo/chn.html项目主页:https://github.com/coolwanglu/pdf2htmlEXUbuntu PPAht ...
 
 

先上Demo:

http://coolwanglu.github.com/pdf2htmlEX/demo/demo.html

还有大家可能会关心的CJK

http://coolwanglu.github.com/pdf2htmlEX/demo/chn.html

项目主页:

https://github.com/coolwanglu/pdf2htmlEX

Ubuntu PPA

https://launchpad.net/~coolwanglu/+archive/pdf2htmlex

Arch Linux
感谢Arthur Titeica 提供 AUG Package

https://aur.archlinux.org/packages.php?ID=62426

传统pdf2html有两种:

一种相当于pdf2text加一些比较弱的格式,基本跟pdf2text也差不了多少
另一种是把所有渲染成图片然后嵌到一个html,结果是文字信息都丢失(不能选择,拷贝),生成的文件还巨大。

pdf2htmlEX结合二者优点,既保留了文字,又保留了格式。
具体来说有如下特性

  • 1.从pdf提取字体
  • 2.保证渲染准确性,针对web进行优化(包括减少文件大小,文字行合并,(为HTML文字选择)字体重编码等等)
  • 3.其他内容用图片显示
  • 4.单文件输出,一个HTML搞定一切

下载编译安装:
依赖:

较新的poppler (0.20.3),自己编译时记得加参数–enable-xpdf-headers
fontforge,需要git版本https://github.com/fontforge/fontforge,因为有一些功能/bug是我开发pdf2htmlEX时提交的
boost c++库,具体依赖的组件见项目主页
cmake和支持c++11的gcc

欢迎各种意见,建议,fork,bug report

分类:

技术点:

相关文章:

  • 2021-12-28
  • 2021-11-16
  • 2021-08-20
  • 2021-08-20
  • 2021-08-20
  • 2021-12-28
  • 2022-02-12
猜你喜欢
  • 2021-11-16
  • 2021-06-12
  • 2021-11-16
  • 2021-11-14
  • 2021-11-26
  • 2021-08-20
相关资源
相似解决方案