Converting PDF to JPG - only getting the first page

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
jmkeuning
Posts: 4
Joined: 2010-12-30T15:14:17-07:00
Authentication code: 8675308

Converting PDF to JPG - only getting the first page

Post by jmkeuning »

I am trying to convert a multipage PDF to JPGs and I am only getting the first page of the PDF. I have imagemagick 6.6.6 and GS 8.6 (I had the lastest GS but I downgraded to try to solve this problem).

Here is what I have tried:

Code: Select all

convert Q:\CBa00001147.pdf Q:\CBa00001147-%d.jpg
convert Q:\CBa00001147.pdf Q:\CBa00001147_%02d.jpg
I also tried

Code: Select all

convert -density 300 Q:\CBa00000334.pdf[2] Q:\CBa00000334-%02d.jpg 
just to try to pull a different page. This works, I get the second page.

Any thoughts on this? Other commands that I can try?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Converting PDF to JPG - only getting the first page

Post by magick »

Add -verbose to your command line and post the output.
jmkeuning
Posts: 4
Joined: 2010-12-30T15:14:17-07:00
Authentication code: 8675308

Re: Converting PDF to JPG - only getting the first page

Post by jmkeuning »

Thanks!

Code: Select all

C:\Documents and Settings\jmkeuning>convert -verbose Q:\CBa00000334.pdf Q:\C
Ba00000334_%02d.jpg
[ghostscript library] Files/gs/gs8.60/bin/gswin32c.exe" -q -dQUIET -dPARANOIDSAF
ER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dEPSCrop -dAlignToPixels=
0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r7
2x72"  "-sOutputFile=C:/Temp/magick-GUYO0do7" "-fC:/Temp/magick-c16bREsh" "-fC:/
Temp/magick-oO38NgUr"C:/Temp/magick-GUYO0do7 PNG 612x792 612x792+0+0 8-bit Direc
tClass 111KB 0.016u 0:00.062
Q:\CBa00000334.pdf PDF 612x792 612x792+0+0 16-bit DirectClass 111KB 0.000u 0:00.
000
Q:\CBa00000334.pdf=>Q:\CBa00000334_00.jpg PDF 612x792 612x792+0+0 16-bit DirectC
lass 65.5KB 0.047u 0:00.110
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Converting PDF to JPG - only getting the first page

Post by magick »

Are you running the 32-bit Windows release of ImageMagick or the 64-bit (e.g. x64)?

Does this work for you?
  • convert logo: logo: logo: logo.pdf
    convert logo.pdf image-%d.jpg
If so, post a URL to your PDF so we can download it and reproduce the problem.
fuchaoqun
Posts: 6
Joined: 2011-01-03T04:59:31-07:00
Authentication code: 8675308

Re: Converting PDF to JPG - only getting the first page

Post by fuchaoqun »

It's the wrong with the latest imagemagick, change to the old version, and you will get all.
jmkeuning
Posts: 4
Joined: 2010-12-30T15:14:17-07:00
Authentication code: 8675308

Re: Converting PDF to JPG - only getting the first page

Post by jmkeuning »

I downgraded to ImageMagick-6.5.9-9-Q8-windows-dll.exe and things are working. Thanks!
Post Reply