Code: Select all
sudo -u username -p password /opt/local/bin/convert -thumbnail 215x300 /file/path/source.pdf[0] -flatten /file/path/target.jpg
Surprisingly this set up has been working for years on Mac OS X 10.7.5 Lion, Apache 2.2, Terascript 6.21, ImageMagick 6.7.6-0, Ghostscript 9.05.
I can confirm that ImageMagick is running fine and can resize images. The error occurs when calling gs (Ghostscript). The error is:
Code: Select all
convert: FailedToExecuteCommand `"/usr/local/bin/gs"... @ error/delegate.c
Edit the delegates.xml file to include an absolute reference to gs (/usr/local/bin/gs).
Changing permissions so Everyone has Execute privileges for gs.
Running gs directly from the script (works, but doesn't answer the question)
Things I am yet to try:
Checking the command syntax. Apparently it shouldn't have changed much between these versions but will in future.