Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert: Postscript delegate failed

I am trying to convert a PDF to JPEG:

$ convert pdf-test.pdf pdf-test.pdf.jpg

However, I am getting this error:

convert: Postscript delegate failed `pdf-test.pdf': No such file or directory @ error/pdf.c/ReadPDFImage/664.
convert: missing an image filename `pdf-test.pdf.jpg' @ error/convert.c/ConvertImageCommand/3015.

Currently I am using this version of GS and ImageMagick on Mac OS X Lion:

$ gs -v
GPL Ghostscript 9.02 (2011-03-30)
Copyright (C) 2010 Artifex Software, Inc.  All rights reserved.

$ convert -version
Version: ImageMagick 6.7.1-1 2011-07-21 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP

Can anybody enlighten me on this?

like image 817
Charlie Kee Avatar asked Mar 20 '12 08:03

Charlie Kee


4 Answers

I was receiving the same error message. I then installed gs and the same command worked properly after that.

like image 83
hjhart Avatar answered Oct 21 '22 10:10

hjhart


Try install GS:

$ brew install gs

like image 44
Weslei Prudencio Avatar answered Oct 21 '22 10:10

Weslei Prudencio


Well, its telling you thre is no such file or directory. Presumably you have checked the file exists. Have you tried using ./pdf-test.pdf, or using a fully-qualified path ?

Have you tried opening the file directly with GS rather than using ImageMagick ? Just to check the fact that GS is working properly. Somthinhg like:

gs ./test-pdf.pdf

ought to open the PDF file in a window.

like image 26
KenS Avatar answered Oct 21 '22 11:10

KenS


ImageMagick sometimes throws this error when you choose too big resolution. Use -density parameter to limit it, e.g. -density 200.

like image 3
Nowaker Avatar answered Oct 21 '22 10:10

Nowaker