views:

252

answers:

1

The system I'm using uses the linux utility convert to convert pdfs to jpgs. My box gives me the following error.

>$ convert Badge-1114044091.pdf Badge-1114044091.jpg
convert: Postscript delegate failed `Badge-1114044091.pdf'.
convert: missing an image filename `Badge-1114044091.jpg'.

But the production machine does not. According to

>$ convert -version

my version is the same as the prodution machine. I'm not sure exactly how to check if postscript needs to be updated. Not really a huge linux guru.

EDIT: Upon suggestion, I checked Ghostscript. The following was already installed.

>$ gs -version
ESP Ghostscript 8.15.3 (2006-08-25)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
+3  A: 

Install GhostScript.

http://www.ghostscript.com/


ImageMagick (the 'convert' utility) doesn't actually convert PDFs; it invokes GhostScript using an arcane command like

gs -q -sDEVICE=jpeg -dBATCH -dNOPAUSE -dFirstPage=1 -dLastPage=1 -r<OUTPUT RESOLUTION> -sOutputFile=<OUTPUT>.jpg <INPUT>.pdf 2>&1

You might want to try that command directly if you want more control.

rjh
Drew
Command works for me with gs version 8.63 (from Ubuntu repositories).
rjh
...try without the -q option, see what is output before it dies.
rjh
ESP Ghostscript 815.03 (2006-08-25)Copyright (C) 2004 artofcode LLC, Benicia, CA. All rights reserved.This software comes with NO WARRANTY: see the file PUBLIC for details.Processing pages 1 through 1.Page 1Segmentation faultNot much more help...
Drew
Upgrading Ghostscript seemed to do the job. Accepting for leading me to Ghostscript.
Drew