Issue with converting PDF pages to images with ImageMagick's convert (and PHP)
Posted
by Joel L
on Stack Overflow
See other posts from Stack Overflow
or by Joel L
Published on 2010-03-23T11:29:46Z
Indexed on
2010/03/23
11:33 UTC
Read the original article
Hit count: 310
php
|imagemagick
I'm trying to create a small web service to convert PDF files to a series of images.
When I run convert /full/path/to/source.pdf full/path/to/target.jpg
when connected to the (shared hosting, Linux) server via ssh, everything works correctly.
When executing the same command through PHP's exec()
function, only the first few pages of the PDF file get converted. Sometimes the remaining pages are 0-length jpg files, sometimes they don't appear at all.
Also, the bottom area of the first pages is sometimes black, as if convert stopped half-way on the page.
What could be causing this problem?
© Stack Overflow or respective owner