Giter Club home page Giter Club logo

pdf2image's Introduction

pdf2image

环境配置:

1. 安装ImageMagick

ImageMagick是一个免费编辑创建合成图片的软件,大多数功能都来自命令行工具,具体可以参照http://www.imagemagick.org/script/index.php

brew install imagemagick
注意,使用brew安装都是7.x版本,使用wand时会出错,需要安装6.x版本。
解决办法:
1.安装6.x版本
  brew install imagemagick@6
2.取消链接7.x版本
  brew unlink imagemagick
* Unlinking /usr/local/Cellar/imagemagick/7.0.7-4… 71 symlinks removed
3.强制链接6.x版本
   brew link imagemagick@6 --force
* Linking /usr/local/Cellar/> imagemagick@6/6.9.9-15… 75 symlinks created
4.export环境变量
  echo 'export PATH="/usr/local/opt/imagemagick@6/bin:$PATH"' 

  ~/.bash_profile

ok,以上解决imagemagick版本问题。

2. 安装gs

必须安装gs,否则pdf无法转换。

brew install gs

3. 安装wand(按照自己的python版本来安装)

wand:是Imagemagick的Python接口

pip3 install wand

安装文档参考

http://blog.csdn.net/wwj_748/article/details/78135879?utm_source=tuicool&utm_medium=referral

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.