pdf2htmlEX项目路径:https://github.com/coolwanglu/pdf2htmlEX

Linux上安装:

详见上述路径,需要安装docker,然后直接命令调用即可。

Mac上安装:

$ brew install poppler

 

使用:

# 默认输出 (生成多个互相嵌套的html文件,以及多个图片
$ pdftohtml sample.pdf sample.html

# 生成"复杂"排版,其实就是更精确排版的意思 --complex
$ pdftohtml -c sample.pdf sample.html

# 指定第一页至最后一页区间:first-last
$ pdftohtml -f 1 -l 2 sample.pdf sample.html
posted on 2020-01-04 16:13  天马行宇  阅读(1412)  评论(0编辑  收藏  举报