I installed GraphicsMagick-1.3.6-Q16-windows-dll.exe on Windows XP Professional x64 SP2. When I try and convert a pdf to jpeg I get the error “gm convert: Postscript delegate failed”. EPS, PS, PDF are listed with the “gm convert -list delegates” command. I’ve tried with and without Ghostscript (v8.63) in path. The pdf’s I’m trying to convert can be downloaded from ftp://ftp2.cits.rncan.gc.ca/pub/canmatrix2/250k_pdf/, but it’s also happened with simpler documents.
WORKAROUND: In “GraphicsMagick\config\delegates.mgk” hardcode the path
to gswin32c.exe by replacing all occurences of
“C:\local\gs\current\bin\gswin32c.exe” (change path according to local
environment of course). This is enough to let me keep working, but it
would be nice to solve the root of the problem so upgrades etc. don’t
The key to discovering the workaround was the empty quotes right after ‘gm convert’:
gm convert 094a_03.pdf test.jpg gm convert: “” -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=ppmraw -dTextA lphaBits=4 -dGraphicsAlphaBits=4 -r72×72 “-sOutputFile=c:\temp\tmp\gme8Jt1t” – “c:\temp\tmp\gmuFty5i” -c quit. gm convert: Postscript delegate failed (094a_03.pdf).
Update:after several exchanges with the graphicsmagick maintainer, Bob Friesenhahnm, and numerous experiments a clean solution was found: upgrade Ghostscript to 8.64. Some valuable things were learned along the way.
It seems that as of gs8.64 the gs registry key has moved from “HKLM\Software\GPL Ghostscript” to “HKLM\Software\WOW6432Node\GPL Ghostscript” and now gm can find it.
To get clean text output from the registry:
regedit /e gs-reg.txt "HKEY_LOCAL_MACHINE\Software\GPL Ghostscript" type gs-reg.txt > gs-reg_ansi.txt
The type command is necessary to convert the Unicode/UTF16 output of regedit to plain ANSI, else strange things happen in email and non-UTF16 aware text editors. Note this might cause problems in non-english environments.
Regedit keys and parameters are case insensitive.
Windows 64 bit machines seem to effectively have two registries (”hives”) and it is possible to place access controls on the registry. There is a hive for 32 bit apps and a hive for 64 bit apps.
References: http://ss64.com/nt/regedit.html, http://ss64.com/nt/type.html