Page 1 of 1

PDF to image breaks in Ghostscript 9.26

Posted: 2019-03-21T09:36:53-07:00
by siegy22
Hey!

I just ran into an issue with one of our applications after updating imagemagick (7.0.8-33)/ghostscript (upgraded from 9.22 to 9.26).
I'm running imagemagick on Mac OS X 10.14.x and used brew to install it.
Our application runs the following command on the command line:

Code: Select all

convert "input.pdf[0]" -quiet -auto-orient -background white -flatten -alpha off -resize "1280x1024>" "output.jpg"
resulting in the following error:

Code: Select all

convert: FailedToExecuteCommand `'gs' -sstdout=%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4 -dGraphicsAlphaBits=4 '-r72x72' -dFirstPage=1 -dLastPage=1 '-sOutputFile=/var/folders/wm/zr3qz1v90nj9ztfyzbpflvsr0000gn/T/magick-10133HVw90EppZG2r%d' '-f/var/folders/wm/zr3qz1v90nj9ztfyzbpflvsr0000gn/T/magick-10133o2whFbJEo2Zq' '-f/var/folders/wm/zr3qz1v90nj9ztfyzbpflvsr0000gn/T/magick-10133hwunS7PpjFvn'' (-1) @ error/delegate.c/ExternalDelegateCommand/478.
convert: no images defined `output.jpg' @ error/convert.c/ConvertImageCommand/3300.
I tried to remove all the flags, didn't do anything.
What fixed the issue was removing the "[0]", but we want the first page of the PDF, so this is no fix for our purposes.

Re: PDF to image breaks in Ghostscript 9.26

Posted: 2019-03-21T09:41:28-07:00
by siegy22
Apparently it seems to be a bug with Ghostscript itself: https://bugs.launchpad.net/ubuntu/+sour ... ug/1806517

Re: PDF to image breaks in Ghostscript 9.26

Posted: 2019-03-21T14:58:24-07:00
by fmw42
Ghostscript 9.26 has bugs. I keep hearing about difficulties and I have downgraded to 9.25