Centos-7安装pdf2htmlEX

标签: Centos-7安装pdf2htmlEX

1.下载软件包

下载地址:(下面是版本列表,本次安装采用的版本是v0.14.6):
https://github.com/coolwanglu/pdf2htmlEX/releases

2.安装依赖

sudo yum install -y cmake gcc gnu-getopt libpng-devel fontforge-devel cairo-devel poppler-devel libspiro-devel freetype-devel poppler-data libjpeg-turbo-devel git make gcc-c++ pango-devel
sudo yum install -y libjpeg-turbo.x86_64 libjpeg-turbo-devel libjpeg-turbo-devel.x86_64 libtiff.x86_64 libtiff-devel openjpeg-devel.x86_64 openjpeg giflibgiflib-devel libxml2.x86_64 libxml2-devel libspiro.x86_64 libspiro-devel libuninameslist-devel.x86_64 

3.解压软件包

tar zxvf pdf2htmlEX-0.14.6.tar.gz

4.设置环境变量

1.将如下两条加入到/etc/profile文件底部
   export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
   export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
2.使其生效
   source /etc/profile

5.编译安装

cmake . && make && sudo make install

注意,在cmake这一不的时候会提示你fontforge版本太低,找不到,所以我们先来解决一下这个问题:

1.首先去下载作者指定的fotforge-devel版本:
https://github.com/coolwanglu/fontforge/tree/pdf2htmlEX
2.根据INSTALL-git.md中的说明安装
先是使用命令./autogen.sh
然后使用命令./configure
使用make命令
使用make install命令

fontforge版本的问题解决后重新执行第5步进行编译