zoukankan      html  css  js  c++  java
  • pdf2htmlEX安装和配置

    1.下载

    安装的依赖:

    sudo yum install  cmake gcc gnu-getopt java-1.8.0-openjdk libpng-devel fontforge-devel cairo-devel poppler-devel libspiro-devel freetype-devel  poppler-data libjpeg-turbo-devel git make gcc-c++ 

    pdf2html源码:https://github.com/coolwanglu/pdf2htmlEX.git

    安装报错:package 'libfontforge>=2.0.0' not found、

    需要安装:fontforge-pdf2htmlEX

    2.安装fontforge

      下载:https://github.com/coolwanglu/fontforge.git

     2.1执行:./autogen.sh; 报错Preparing build ... ERROR: libtoolize failed

    解决:没有安装libtool-ltdl-devel。

    yum install
    libtool-ltdl-devel

    2.2 执行 ./configure
    configure: error: Package requirements (pango >= 1.10 pangoxft) were not met:
    
    No package 'pango' found
    No package 'pangoxft' found
    
    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.
    
    Alternatively, you may set the environment variables PANGO_CFLAGS
    and PANGO_LIBS to avoid the need to call pkg-config.
    See the pkg-config man page for more details.

    这个问题困扰了好久,百度、google都没有找到,突然来了灵感;yum install pango-devel 解决

    make && make install 

    3.接的安装pdf2html

     

     export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig 
    [100%] Generating share/pdf2htmlEX.min.js
    make[2]: execvp: share/build_js.sh: Permission denied
    make[2]: *** [share/pdf2htmlEX.min.js] Error 127
    make[1]: *** [CMakeFiles/pdf2htmlEX_resources.dir/all] Error 2
    make: *** [all] Error 2
    [root@iZije4ffdt70xyZ pdf2htmlEX-master]# 
    
    这个错误:原因是我直接复制到服务器的,文件缺少执行的权限。

     最后:

    LD_LIBRARY_PATH=/usr/local/lib
    export LD_LIBRARY_PATH

    python  执行:subprocess.call(r"pdf2htmlEX "+upload_pdf+" "+upload_html,shell=True)

    参考资料:https://blog.csdn.net/paulluo0739/article/details/54286889

  • 相关阅读:
    PointToPointNetDevice doesn't support TapBridgeHelper
    NS3系列—10———NS3 NodeContainer
    NS3系列—9———NS3 IP首部校验和
    NS3系列—8———NS3编译运行
    【习题 7-6 UVA
    【Good Bye 2017 C】 New Year and Curling
    【Good Bye 2017 B】 New Year and Buggy Bot
    【Good Bye 2017 A】New Year and Counting Cards
    【Educational Codeforces Round 35 D】Inversion Counting
    【Educational Codeforces Round 35 C】Two Cakes
  • 原文地址:https://www.cnblogs.com/myvic/p/pdf2htmlEX-course.html
Copyright © 2011-2022 走看看