Page 1 of 1

convert stops at GS prompt

Posted: 2016-11-17T19:23:54-07:00
by twodown
When I run convert against a pdf it is stopping at a Ghostscript prompt (GS>) When I run i with verbose it seems to be pulling correct delegate entry but not executing in the correct way, stops at a GS prompt. Works correctly on another machine. What does stopping at GS prompt indicate?

convert -verbose /tmp/CCMC.pdf -density 72 -auto-orient -resize "450x450>" /tmp/ImageMagickContentTransformerWorker_target_979552780204846943.png
"gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=/tmp/magick-23773eqjhLPZLdPuN%d" "-f/tmp/magick-237735LbgzE7CZxY5" "-f/tmp/magick-23773ypW2D4aBQpso"
GPL Ghostscript 8.64 (2009-02-03)
Copyright (C) 2009 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS>

Re: convert stops at GS prompt

Posted: 2016-11-17T19:27:41-07:00
by snibgo
Your version of GS (8.64) is very old. I suggest you upgrade it.

If that doesn't solve it, what version of IM are you running? If old, upgrade it.

If that doesn't solve it, please post your pdf file somewhere like dropbox.com and paste the URL here.

Re: convert stops at GS prompt

Posted: 2016-11-17T21:26:07-07:00
by twodown
will upgrade GS, but with same version of ImageMagick and PDF this works fin on another machine/environment:

convert -verbose /home/test/CCMC.pdf -density 72 -auto-orient -resize "450x450>" /tmp/ImageMagickContentTransformerWorker_target_979552780204846943.png
"gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=/tmp/magick-13028bu5JnBmsJvuj%d" "-f/tmp/magick-13028e9YyY17KSpe8" "-f/tmp/magick-13028weQD1jmtioYW"
/tmp/magick-13028bu5JnBmsJvuj1 PNG 612x792 612x792+0+0 8-bit sRGB 99.8KB 0.000u 0:00.000
/tmp/magick-13028bu5JnBmsJvuj2 PNG 612x792 612x792+0+0 8-bit sRGB 78.1KB 0.000u 0:00.000
/home/michaelwallach/Desktop/CCMC.pdf[0] PDF 612x792 612x792+0+0 16-bit sRGB 99.8KB 0.000u 0:00.000
/home/test//CCMC.pdf[1] PDF 612x792 612x792+0+0 16-bit sRGB 99.8KB 0.000u 0:00.000
/home/test//CCMC.pdf=>/tmp/ImageMagickContentTransformerWorker_target_979552780204846943-0.png[0] PDF 612x792=>348x450 348x450+0+0 16-bit sRGB 264KB 0.000u 0:00.000
/home/test//CCMC.pdf=>/tmp/ImageMagickContentTransformerWorker_target_979552780204846943-1.png[1] PDF 612x792=>348x450 348x450+0+0 16-bit sRGB 230KB 0.000u 0:00.000
[testuser@localhost ~]$ gs -version
GPL Ghostscript 8.70 (2009-07-31)
Copyright (C) 2009 Artifex Software, Inc. All rights reserved.

Re: convert stops at GS prompt

Posted: 2016-11-17T21:34:34-07:00
by fmw42
Do you have the same versions of Ghostscript on both systems?

What do you get from each system when you type

convert -version

Re: convert stops at GS prompt

Posted: 2016-11-18T09:26:24-07:00
by twodown
Version: ImageMagick 6.9.1-10 Q16 x86_64 2015-08-12 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules
Delegates (built-in): freetype jng jpeg ltdl png tiff wmf

I'm not sure why ImageMagick is using different versions of ghostscript in diff environments. How does ImageMagick identify version of gs to use? Is it what resolved from PATH?

Re: convert stops at GS prompt

Posted: 2016-11-18T11:00:51-07:00
by twodown
obviously gs is not finding something it needs (or is not installed completely) because:

"gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=/tmp/magick-13028bu5JnBmsJvuj%d" "-f/tmp/magick-13028e9YyY17KSpe8" "-f/tmp/magick-13028weQD1jmtioYW"

works with both 8.64 & 8.7 of gs in working environment. Just not sure how to detect what is missing/corrupt

Re: convert stops at GS prompt

Posted: 2016-11-18T11:04:48-07:00
by fmw42
Did you try upgrading Ghostscript as user snibgo suggested? What is your platform?

Try reinstalling GS (and upgrading) and then install IM again.

Re: convert stops at GS prompt

Posted: 2016-11-18T11:15:06-07:00
by twodown
Is there a way to see which delegate is actually being used (assuming one is)?

Re: convert stops at GS prompt

Posted: 2016-11-18T12:27:41-07:00
by fmw42
convert -verbose ...

Will show you which GS version is being used. Or will give an error message regarding GS

How do you know it is stopping at GS? All verbose tells you is that it is using GS unless there is an error message and I do not see one above.

What is your version libpng?

convert -list format

will tell you that and others (but not GS), e.g.


PNG* PNG rw- Portable Network Graphics (libpng 1.6.24)

You can find what version of GS is on your system via

gs --version

at least on unix systems.

Re: convert stops at GS prompt

Posted: 2016-11-18T12:34:10-07:00
by fmw42
I would concur with user snibgo. The best thing would be to upgrade ghostscript and then upgrade IM.