PDF thumbnail Generating Error

Good Morning
I istalled ImageMagick and GhostScript then Omeka I tested uploading images and thumbnails just been generated fine, but not with PDF> here my error log file came with:
2015-12-01T14:06:18+02:00 WARN (4): Error output from ImageMagick:
convert: no decode delegate for this image format `/tmp/magick-uYWp0zZ1-00000001' @ error/constitute.c/ReadImage/532.
convert: Postscript delegate failed `/tmp/d3d8dfdaaa2ade22c94076ee6fbeb45e.pdf': No such file or directory @ error/pdf.c/ReadPDFImage/664.
convert: missing an image filename `/tmp/fullsize_d3d8dfdaaa2ade22c94076ee6fbeb45e.jpg' @ error/convert.c/ConvertImageCommand/3016.

2015-12-01T14:06:18+02:00 ERR (3): ImageMagick failed with status code 1.

usually ImageMagick can handle PDFs, but there are sometime anomolies. What version of ImageMagick do you have?

thanks for the quick reply
its version is ImageMagick-6.9.2
and actually it has permission on the tmp dir

@emadof - did you ever manage to resolve the issue? I am encountering the same issue.

The strange thing is that when I manually run the command that ExternalImageMagick.php creates in terminal it works without a hitch.

/usr/local/bin/convert '/var/tmp//8aa2fa9ac8f11854b3df71f21767a3fe.pdf[0]' -background white +repage -flatten -thumbnail '6000x6000>' '/var/tmp/fullsize_8aa2fa9ac8f11854b3df71f21767a3fe.jpg'

Ok, that was, as we say, a difficult birth.

The issue is caused because the Apache server does not necessarily have access to the PATH and therefor does not know where the Ghostscript command is located.

To fix the issue, there are two possibilities - make Apache aware of what is in path, for example by editing org.apache.httpd.plist and adding the following:

<br />
<key>EnvironmentVariables</key><br />
<dict><br />
    <key>PATH</key><br />
   <string>/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin</string><br />
</dict><br />

Or another possibility is to edit Imagemagick's delegates.xml file, updating command=""gs" with the full path to Ghostscript like command=""/usr/local/bin/gs". You can find the location of delegates.xml by running convert -list delegate. Please note the double opening quotation marks in the command syntax.

I suppose the first variant would be preferable, as any upgrade to IM might require delegates.xml to be updated again. But that depending on your server environment you may not be able to edit the Apache install.

I had this problem running Omeka locally on OSX where gs was installed in /usr/local/bin. I wasn't able to get this to work by adding to the Apache path variable or to delegates.xml as suggested above, but linking to gs from /usr/bin worked!

How did you do that?