convert pdf to png

Carl K carl at personnelware.com
Mon Dec 24 09:22:44 EST 2007


Jaap Spies wrote:
> Carl K wrote:
>> I need to take the take the pdf output from reportlab and create a 
>> preview image for a web page.  so png or something.  I am sure 
>> ghostscript will be involved. I am guessing PIL or ImageMagic ?
>>
>> all sugestions welcome.
>>
> 
> If it is a multi page pdf Imagemagick will do:
> 
> convert file.pdf page-%03d.png

I need python code to do this.  It is going to be run on a someone else's shared 
host web server, security and performance is an issue.  So I would rather not 
run stuff via popen.  I also need something that is easy to install.  (either 
easy_install or a distro package)

I just looked at what it takes to install PythonMagick:

Requists for installation is:
boost
boost-python
python 2.5
Magick++ (>= 6.2)
and for building:
pkg-config
libtool
make

That is looking like maybe "not easy to install"

so I need to make an easy_install-able .tgz or some other way of making the image.

Carl K



More information about the Python-list mailing list