pdf2htmlex解决 Unknown filter 'JPXDecode'报错编译安装方法

 ·  2024-08-14

一、下载代码

1、mkdir pdf2htmlex

2、cd pdf2htmlex

3、git clone https://github.com/pdf2htmlEX/pdf2htmlEX.git

二、修改文件增加openjpeg2库

Add libopenjp2-7-dev to ./buildScripts/getDevLibrariesApt

Change ./buildScripts/buildPoppler cmake flag DENABLE_LIBOPENJPEG from 'none' to 'openjpeg2'

Add -lopenjp2 to PDF2HTMLEX_LIBS in ./pdf2htmlEX/CMakeLists.txt Then start building normally (./buildScripts/buildInstallLocallyApt)

I made some patches and little script for applying them. openjp2.zip Just unzip it in pdf2htmlEX root dir, cd into openjp2_patch then run ./patch.sh Then start building.

三、执行编译

1、./buildScripts/buildInstallLocallyApt

四、使用

pdf2htmlEX --zoom 1.3 --embed i --dest-dir /home/xdc/pdf2html/pdf/output/ /home/xdc/pdf2html/pdf/9787518050130.pdf --debug 1 --dpi 144 --bg-format png --no-drm 1

五、附件
pdf2htmlEX_Ss5a7.tar.gz

六、参考链接

1、https://github.com/pdf2htmlEX/pdf2htmlEX
2、https://github.com/pdf2htmlEX/pdf2htmlEX/issues/81
 
上一篇:没有了
评论
Jan. All Rights Reserved. Theme Jasmine by Kent Liao.
蜀ICP备2023017538号-1