Convert: Postscript delegate failed
Solution 1
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.
Solution 2
I was receiving the same error message. I then installed gs and the same command worked properly after that.
Solution 3
Try install GS:
$ brew install gs
Solution 4
ImageMagick sometimes throws this error when you choose too big resolution. Use -density
parameter to limit it, e.g. -density 200
.
Solution 5
I've encountered this problem today, and it seemed to relate to the overflowing of the /tmp volume. Specifically, it's the magick-* files that were overflowing the storage.
Freeing up the /tmp files solved the problem for me.
Charlie Kee
I am a full time Java Web Programmer with working experience using J2SE, Hibernate, MySQL, and Apache Maven.
Updated on May 07, 2020Comments
-
Charlie Kee about 4 years
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?
-
Vlad Patryshev about 11 yearsThis also happens when your "pdf" file is empty.
-
-
Charlie Kee about 12 yearsHi Ken, Thanks for your help. I have followed your steps and i have attached a screenshot. dl.dropbox.com/u/5059542/… Upon performing the convert pdf-test.pdf i can see a file without extension magick-1FxqMZQQ-00000001 being generated as shown on the screenshot. it is actually JPG file. What does this actually tell me ? Thanks man.
-
KenS about 12 yearsOK well that means that GS works, and is able to open the file without problems. The fact that you see a JPEG file being generated shows that GS is running for the convert step as well, and making a JPEG file. However it obviously doesn't have the correct name. What I can't tell you is why this is happening. Its possible that convert is supposed to rename or copy the file, or that it gave the wrong output filename to Ghostscript. I'm afraid you need someone who can help you debug 'convert' rather than Ghostscript :-(
-
Charlie Kee about 12 yearsHi Ken Thanks again for the help. i have decided to use GS directly instead relying on ImageMagick convert to run gs background...It works pretty much the same, if not faster in fact :)
-
nunb over 10 yearsthis worked for me after updating OSX. brew seemed to have become outdated and gs no longer existed in the right place.
-
Petter over 10 yearsYes, this is probably the correct answer in general.
-
Selvamani about 10 years+1, yeah, its correct. for more info imagemagick.org/script/formats.php here
-
Blitz almost 10 yearsPlease note that if you're on mac and use brew, you also need to add a link to /usr/bin/gs for this to work correctly everywhere! stackoverflow.com/questions/10455985/…
-
Fedir RYKHTIK almost 10 yearsDebian :
aptitude install ghostscript