Hello everyone.
I am using IM in a php driven web app to manage uploaded images. Currently, i am accepting all image types, and converting those images to png's for browser compatibility. I've run into a problem dealing with PDF's though. Here's the breakdown.
Conversions from any file type to PDF work using php, and directly from the shell.
Conversion from PDF to any file type work using the shell only.
Conversion from PDF to any file type using PHP fail with a return value of 1.
All other conversions not involving PDF's work both in the shell, and PHP.
I can't seem to figure out why PDF's cant be converted from PHP. Both IM and Ghostscript have been recompiled. Any suggestions/ideas on what may be happening and how i can fix it?
Testing has been done with a 180kb single page pdf file on a Red Hat server.
Php and converting PDF's with IM
Re: Php and converting PDF's with IM
Hi All,
I'm having the identical problem. My setup is as follows:
MAMP (os x leopard)
ImageMagick 6.4.9-6
Ghostscript 8.64
I have been searching on this for a week now and it appears nobody on earth (according to google anyways) has had this problem and been able to fix it.
Bummer...
I'm having the identical problem. My setup is as follows:
MAMP (os x leopard)
ImageMagick 6.4.9-6
Ghostscript 8.64
I have been searching on this for a week now and it appears nobody on earth (according to google anyways) has had this problem and been able to fix it.
Bummer...
Re: Php and converting PDF's with IM
The PHP environment is different from the command line. For example, the gs program may not be in the execution path. To fix, edit delegate.xml and change references to 'gs' to their absolute path (e.g. /usr/local/bin/gs).