Discussion:
[GM-help] troubleshooting "gm convert: Postscript delegate failed"
Matt Wilkie
2009-09-02 16:57:02 UTC
Permalink
Hello List,

I've 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 like the attached.

Some relevant environment variables:

GS=gswin32
GSC=gswin32c
GS_DLL=c:\local\gs\current\bin
GS_FONTPATH=c:\local\gs\fonts;C:\WINDOWS\fonts;Z:\ArcView\utilities\Fonts
GS_LIB=c:\local\gs\current\lib;c:\local\gs\fonts;C:\WINDOWS\fonts;Z:\ArcView\uti
lities\Fonts
gs_root=c:\local\gs
gs_ver=current
Path=c:\Program Files (x86)\Support
Tools\;C:\WINDOWS\System32;C:\WINDOWS\system
32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\utils;C:\WINDOWS\sysWOW64;C:\ESRI\work
station\arcexe9x\bin;c:\local\gtk\bin;C:\Python25\Lib\site-packages\PyQt4;C:\Pro
gram Files\TortoiseSVN\bin;C:\Program
Files\TortoiseHg;c:\local\graphicsmagick;c
:\local\gs\current\bin;c:\local\gs\current\lib

What does this error message mean and how can I fix it?

thank you,
--
matt wilkie
--------------------------------------------
Geomatics Analyst
Information Management and Technology
Yukon Department of Environment
10 Burns Road * Whitehorse, Yukon * Y1A 4Y9
867-667-8133 Tel * 867-393-7003 Fax
http://environmentyukon.gov.yk.ca/geomatics/
--------------------------------------------
Matt Wilkie
2009-09-02 17:39:25 UTC
Permalink
I found a workaround: In "GraphicsMagick\config\delegates.mgk" hardcode
the path to gswin32c.exe by replacing all occurences of "@PSDelegate@"
with "C:\local\gs\current\bin\gswin32c.exe"

That's enough to let me keep working, but it would be nice to solve the
root of the problem so upgrades etc. don't break.

cheers,

matt wilkie
--------------------------------------------
Geomatics Analyst
Information Management and Technology
Yukon Department of Environment
10 Burns Road * Whitehorse, Yukon * Y1A 4Y9
867-667-8133 Tel * 867-393-7003 Fax
http://environmentyukon.gov.yk.ca/geomatics/
--------------------------------------------
Post by Matt Wilkie
Hello List,
I've 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 like the attached.
GS=gswin32
GSC=gswin32c
GS_DLL=c:\local\gs\current\bin
GS_FONTPATH=c:\local\gs\fonts;C:\WINDOWS\fonts;Z:\ArcView\utilities\Fonts
GS_LIB=c:\local\gs\current\lib;c:\local\gs\fonts;C:\WINDOWS\fonts;Z:\ArcView\uti
lities\Fonts
gs_root=c:\local\gs
gs_ver=current
Path=c:\Program Files (x86)\Support
Tools\;C:\WINDOWS\System32;C:\WINDOWS\system
32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\utils;C:\WINDOWS\sysWOW64;C:\ESRI\work
station\arcexe9x\bin;c:\local\gtk\bin;C:\Python25\Lib\site-packages\PyQt4;C:\Pro
gram Files\TortoiseSVN\bin;C:\Program
Files\TortoiseHg;c:\local\graphicsmagick;c
:\local\gs\current\bin;c:\local\gs\current\lib
What does this error message mean and how can I fix it?
thank you,
Bob Friesenhahn
2009-09-02 19:30:24 UTC
Permalink
Post by Matt Wilkie
I found a workaround: In "GraphicsMagick\config\delegates.mgk" hardcode
with "C:\local\gs\current\bin\gswin32c.exe"
That's enough to let me keep working, but it would be nice to solve the
root of the problem so upgrades etc. don't break.
It seems that the problem is that you are using a 64-bit version of
Windows. Did you install the 64-bit version of Ghostscript?

In normal operation under Windows, GraphicsMagick loads Ghostscript as
a DLL so a 32-bit GraphicsMagick would need a 32-bit Ghostscript.
There is currently no 64-bit GraphicsMagick since I don't have 64-bit
Windows here.

Your workaround should be fine although I assume that you see a pop-up
window while Ghostscript is running.

The alternative is to make sure that you have a 32-bit version of
Ghostscript installed and then maybe it will work better with
GraphicsMagick.

Bob
Post by Matt Wilkie
Post by Matt Wilkie
I've 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 like the attached.
GS=gswin32
GSC=gswin32c
GS_DLL=c:\local\gs\current\bin
GS_FONTPATH=c:\local\gs\fonts;C:\WINDOWS\fonts;Z:\ArcView\utilities\Fonts
GS_LIB=c:\local\gs\current\lib;c:\local\gs\fonts;C:\WINDOWS\fonts;Z:\ArcView\uti
lities\Fonts
gs_root=c:\local\gs
gs_ver=current
Path=c:\Program Files (x86)\Support
Tools\;C:\WINDOWS\System32;C:\WINDOWS\system
32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\utils;C:\WINDOWS\sysWOW64;C:\ESRI\work
station\arcexe9x\bin;c:\local\gtk\bin;C:\Python25\Lib\site-packages\PyQt4;C:\Pro
gram Files\TortoiseSVN\bin;C:\Program
Files\TortoiseHg;c:\local\graphicsmagick;c
:\local\gs\current\bin;c:\local\gs\current\lib
What does this error message mean and how can I fix it?
thank you,
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Graphicsmagick-help mailing list
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help
--
Bob Friesenhahn
***@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Matt Wilkie
2009-09-02 20:19:38 UTC
Permalink
Hi Bob,
Post by Bob Friesenhahn
It seems that the problem is that you are using a 64-bit version of
Windows. Did you install the 64-bit version of Ghostscript?
Nope, it's 32bit ghostscript:

C:\> gswin32c --help
GPL Ghostscript 8.63 (2008-08-01)
Copyright (C) 2008 Artifex Software, Inc. All rights reserved.
...snip...
Post by Bob Friesenhahn
Your workaround should be fine although I assume that you see a pop-up
window while Ghostscript is running.
No, no popup.

matt wilkie
--------------------------------------------
Geomatics Analyst
Information Management and Technology
Yukon Department of Environment
10 Burns Road * Whitehorse, Yukon * Y1A 4Y9
867-667-8133 Tel * 867-393-7003 Fax
http://environmentyukon.gov.yk.ca/geomatics/
--------------------------------------------
Bob Friesenhahn
2009-09-06 21:58:47 UTC
Permalink
Post by Matt Wilkie
Hi Bob,
Post by Bob Friesenhahn
It seems that the problem is that you are using a 64-bit version of
Windows. Did you install the 64-bit version of Ghostscript?
C:\> gswin32c --help
GPL Ghostscript 8.63 (2008-08-01)
Copyright (C) 2008 Artifex Software, Inc. All rights reserved.
...snip...
I am trying to get to the bottom of this issue. If you used the
unedited delegates.mgk file (with @PSDelegate@ bits still intact),
then (when things are working properly), the '@PSDelegate@' should be
converted to the full path to gswin32c.exe in the 'gm convert -list
delegate' output. If it is not, then there is probably an issue with
finding the installed Ghostscript via the Windows registry.

Can you temporarily replace delegates.mgk with the original version
and see if the full path to gswin32c is properly substituted in the
output of 'gm convert -list delegate'?

Thanks,

Bob
--
Bob Friesenhahn
***@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Bob Friesenhahn
2009-09-09 01:47:27 UTC
Permalink
Post by Matt Wilkie
I've 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.
I don't know if it will solve the problem, but the latest development
snapshot contains completely re-written Ghostscript detection logic.
Download from

ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/snapshots

I did notice that there was some old code which seemed to want to bail
based on Windows version. Since the code dates from before 2002, it
is quite possible that it became broken. This code is no longer
present.

Please test.

Bob
--
Bob Friesenhahn
***@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/

Loading...