Page 1 of 1

Imagemagick convert pdf to png returns error

Posted: 2014-09-27T00:28:22-07:00
by meganathan
Hi,

The imagemagick returns below error message if convert pdf to png image

Coding: convert -density 300 pdftoimages/pdf.pdf[1,2,3] pdftoimages/page.jpg

error:

convert.exe: `%s' (%d) "gswin32c.exe" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOP
ROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha"
-dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r300x300" -dFirstPage=2 -dLastPage=4 "
-sOutputFile=C:\Users\user55\AppData\Local\Temp\magick-2992ZBhsSuaTHHqt-1" "-fC:
\Users\user55\AppData\Local\Temp\magick-2992jzHkx-XhehJb" "-fC:\Users\user55\App
Data\Local\Temp\magick-2992LNOaaeHFmGyb" @ error/utility.c/SystemCommand/2036.
convert.exe: Postscript delegate failed `pdftoimages/pdf.pdf': No such file or d
irectory @ error/pdf.c/ReadPDFImage/713.
convert.exe: no images defined `pdftoimages/page.jpg' @ error/convert.c/ConvertI
mageCommand/3147.

Kindly help me anyone.

We are stopped our developing process due to above error.

thanks and regards,
Meganathan P

Re: Imagemagick convert pdf to png returns error

Posted: 2014-09-27T06:03:19-07:00
by snibgo
convert.exe: Postscript delegate failed `pdftoimages/pdf.pdf': No such file or directory @ error/pdf.c/ReadPDFImage/713.
Does that file exist?

You seem to be using Windows, where "\" is normally used.

Re: Imagemagick convert pdf to png returns error

Posted: 2014-09-28T21:55:00-07:00
by meganathan
Hi,

Yes The file exists.

convert -density 300 pdftoimages/pdf.pdf[1,2,3] pdftoimages/page.jpg

This above code what i am used.

Here i used / only and i am running on windows 7 os


Thanks and Regards,
Meganathan P

Re: Imagemagick convert pdf to png returns error

Posted: 2014-09-28T22:17:00-07:00
by fmw42
What version of IM and platform are you using? Always provide that when asking questions on this forum, since there are syntax differences.

If Window, then try using windows syntax directories with full paths with \ rather than /

Code: Select all

convert -density 300 pdftoimages\pdf.pdf[1,2,3] pdftoimages\page.jpg
Forward slash / is unix syntax

Re: Imagemagick convert pdf to png returns error

Posted: 2014-09-28T22:20:55-07:00
by meganathan
Hi,

Still i am getting below error messagge


D:\wamp\www>convert -density 300 pdftoimages\sample.pdf[1,2,3] pdftoimages\page.
jpg
convert.exe: `%s' (%d) "gswin32c.exe" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOP
ROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha"
-dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r300x300" -dFirstPage=2 -dLastPage=4 "
-sOutputFile=C:\Users\user55\AppData\Local\Temp\magick-1100eoceELhTIeoY-1" "-fC:
\Users\user55\AppData\Local\Temp\magick-11000yqtcjOmJODO" "-fC:\Users\user55\App
Data\Local\Temp\magick-1100leqX3qFJ3muq" @ error/utility.c/SystemCommand/2036.
convert.exe: Postscript delegate failed `pdftoimages\sample.pdf': No such file o
r directory @ error/pdf.c/ReadPDFImage/713.
convert.exe: no images defined `pdftoimages\page.jpg' @ error/convert.c/ConvertI
mageCommand/3147.


Thanks and Regards,
Meganathan P

Re: Imagemagick convert pdf to png returns error

Posted: 2014-09-28T22:44:52-07:00
by snibgo
How much free space do you have in your temp directory, C:\Users\user55\AppData\Local\Temp\ ? Can you write to that directory?

Re: Imagemagick convert pdf to png returns error

Posted: 2014-10-14T11:59:12-07:00
by dlemstra
Did you install Ghostscript? It looks like ImageMagick cannot find Ghostscript.