convert pdf to png

Grant Edwards grante at visi.com
Mon Dec 24 11:30:39 EST 2007


On 2007-12-24, Carl K <carl at personnelware.com> wrote:

>> 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.

Use subprocess.

Trying to eliminate popen because of the overhead when running
ghostscript to render PDF (I assume convert uses gs?) is about
like trimming an elephants toenails to save weight.

> I also need something that is easy to install. (either
> easy_install or a distro package)

That's a problem.

-- 
Grant




More information about the Python-list mailing list