First and foremost, these are my specs:
Ubuntu 14.04
ImageMagick 6.7.7
Ghostscript 9.10
I'll list these, as well, but I don't think they're relevant to this query:
Imagick 3.4.0
PHP 5.6.18
I'm needing to work with pdf and eps files, so naturally I'm needing to utilize Ghostscript. This was already installed before I did anything with ImageMagick and I was expecting to see those two formats listed along with the default formats in ImageMagick's list of delegates, but for some reason ImageMagick did not recognize the existence of Ghostscript.
I ran the "which" command in the cli for "convert" as well as "gs" and they both appear to be within the same directory. I believe the current version for GS is 9.21 (currently running 9.10), so updating that might play into the solution, but it might not. I'm trying to avoid reinstalling ImageMagick if at all possible, but if it has to be done, it has to be done.
So, how exactly should I tackle this issue? Any feedback surrounding this would be greatly appreciated. Thanks.
ImageMagick Not Detecting Ghostscript (Ubuntu)
-
- Posts: 8
- Joined: 2017-01-11T14:43:03-07:00
- Authentication code: 1151
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: ImageMagick Not Detecting Ghostscript (Ubuntu)
What is the text output from ...
If this can't find GS, a "-debug all" might give a clue.
Code: Select all
convert -verbose in.pdf out.png
snibgo's IM pages: im.snibgo.com
-
- Posts: 8
- Joined: 2017-01-11T14:43:03-07:00
- Authentication code: 1151
Re: ImageMagick Not Detecting Ghostscript (Ubuntu)
Thanks for the quick reply.
I tried your suggestion and this is what I got:
$ convert -verbose test.pdf test_pdf_to_png.png
"gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=/tmp/magick-SB8BEVN3-%08d" "-f/tmp/magick-KTsbOaDN" "-f/tmp/magick-HNDCwtsx"
/tmp/magick-SB8BEVN3-00000001 PNG 279x378 279x378+0+0 8-bit DirectClass 25.3KB 0.000u 0:00.000
test.pdf PDF 279x378 279x378+0+0 16-bit DirectClass 25.3KB 0.000u 0:00.000
test.pdf=>test_pdf_to_png.png PDF 279x378 279x378+0+0 8-bit PseudoClass 254c 8.19KB 0.020u 0:00.019
A png file was successfully created and since "gs" shows up on the first line of that output, I'm assuming that ImageMagick is, in fact, communicating with GS.
But, why doesn't that extension show up when I type in "convert -list configure" (a pdf, that is)?:
DELEGATES bzlib djvu fftw fontconfig freetype jbig jpeg jng jp2 lcms2 lqr lzma openexr pango png rsvg tiff x11 xml wmf zlib
I tried your suggestion and this is what I got:
$ convert -verbose test.pdf test_pdf_to_png.png
"gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=/tmp/magick-SB8BEVN3-%08d" "-f/tmp/magick-KTsbOaDN" "-f/tmp/magick-HNDCwtsx"
/tmp/magick-SB8BEVN3-00000001 PNG 279x378 279x378+0+0 8-bit DirectClass 25.3KB 0.000u 0:00.000
test.pdf PDF 279x378 279x378+0+0 16-bit DirectClass 25.3KB 0.000u 0:00.000
test.pdf=>test_pdf_to_png.png PDF 279x378 279x378+0+0 8-bit PseudoClass 254c 8.19KB 0.020u 0:00.019
A png file was successfully created and since "gs" shows up on the first line of that output, I'm assuming that ImageMagick is, in fact, communicating with GS.
But, why doesn't that extension show up when I type in "convert -list configure" (a pdf, that is)?:
DELEGATES bzlib djvu fftw fontconfig freetype jbig jpeg jng jp2 lcms2 lqr lzma openexr pango png rsvg tiff x11 xml wmf zlib
Re: ImageMagick Not Detecting Ghostscript (Ubuntu)
It's not showing up there because your version of ImageMagick is not linked with the Ghostscript library. When that happens ImageMagick will try to just execute 'gs' instead and that works because it can be found on your system.
-
- Posts: 8
- Joined: 2017-01-11T14:43:03-07:00
- Authentication code: 1151
Re: ImageMagick Not Detecting Ghostscript (Ubuntu)
Ah, I see.
Thank you so much for the quick replies and input. And that goes out to dlemstra and snibgo.
Thank you so much for the quick replies and input. And that goes out to dlemstra and snibgo.