centos安装pdf2htmlEX

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

1.安装基本工具和依赖库

yum install vim unzip wget git gcc* cmake poppler* libtool* glib* gio* freetype* pango* cairo* -y

2.安装fontforge

  • wget https://github.com/coolwanglu/fontforge/archive/pdf2htmlEX.zip
  • unzip pdf2htmlEX.zip
  • cd fontforge-pdf2htmlEX
  • ./atuogen.sh
  • ./configure
  • make 过程遇到如下错误时需要修改fontforge/ufo.c的文件(用gcc4.8.5时遇到问题)

ufo.c:925:12: error: conflicting types for 'SplinePointListInterpretGlif' SplineSet *SplinePointListInterpretGlif(char *filename,char *memory, int memlen, ^ In file included from fontforge.h:36:0, from fontforgevw.h:30, from ufo.c:37: splinefont.h:2880:19: note: previous declaration of 'SplinePointListInterpretGlif' was here extern SplineSet *SplinePointListInterpretGlif(SplineFont *sf,char *filename,char *memory, int memlen, int em_size, int ascent,int stroked);

&& make install

3. 编译安装转pdf2htmlEX

wget https://github.com/coolwanglu/pdf2htmlEX/archive/master.zip

  • unzip master.zip
  • cd pdf2htmlEX
  • export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
  • cmake .
  • make && make install
  • ln -s /usr/local/lib/libfontforge.so.2 /lib64/libfontforge.so.2

转载于:https://my.oschina.net/icoderme/blog/3006556

你可能感兴趣的:(centos安装pdf2htmlEX)