Imagemagick convert pdf to png returns error

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
meganathan
Posts: 10
Joined: 2014-09-13T00:32:18-07:00
Authentication code: 6789

Imagemagick convert pdf to png returns error

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Imagemagick convert pdf to png returns error

Post 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.
snibgo's IM pages: im.snibgo.com
meganathan
Posts: 10
Joined: 2014-09-13T00:32:18-07:00
Authentication code: 6789

Re: Imagemagick convert pdf to png returns error

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Imagemagick convert pdf to png returns error

Post 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
meganathan
Posts: 10
Joined: 2014-09-13T00:32:18-07:00
Authentication code: 6789

Re: Imagemagick convert pdf to png returns error

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Imagemagick convert pdf to png returns error

Post 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?
snibgo's IM pages: im.snibgo.com
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Imagemagick convert pdf to png returns error

Post by dlemstra »

Did you install Ghostscript? It looks like ImageMagick cannot find Ghostscript.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Post Reply