I'm using IM to convert both PDFs and image files to JPEG. I have IM and ghostscript installed on Mac OS X using MacPorts and everything works fine in Terminal, with PDFs or otherwise.
I tried to call the convert command using AppleScript's "do shell script" command and "convert" wasn't recognized. Thanks to the following Apple developer note, I realized that AppleScript just needed the path to IM to be explicitly set, so instead of convert, I used /opt/local/bin/convert.http://developer.apple.com/technotes/tn2002/tn2065.html
Problem partially solved. Now I'm finding that when using IM within AppleScript on PDFs, it has the same problem finding the gs command, only I don't know how to specify the path because I'm not calling gs directly.
This is just a shot in the dark, but I'm looking at /opt/local/lib/ImageMagick-6.5.4/config/delegates.xml and wondering if the following line (or another one like it) can be edited somehow to include the full path to gs:
<delegate decode="pdf" encode="eps" mode="bi" command=""gs"
; -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=epswrite" "-sOutputFile=%o" "-f%i""/>
If so, what is the exact language needed (I already know the path is /opt/local/bin/gs), and if not, what else can I do?