Converting PDF only converts first page

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
martinyyyy
Posts: 4
Joined: 2011-01-15T08:15:44-07:00
Authentication code: 8675308

Converting PDF only converts first page

Post by martinyyyy »

Hi there,

I'm trying to convert a PDF file with 4 pages but it always only converts the first page.
The PDF is created with Adobe Reader Pro.

This is how I try to convert:

Code: Select all

convert.exe Sammelmappe2.pdf tescht.jpg
This works with some PDFs fine but with most not.
This is the PDF I'm trying to convert:

http://dl.dropbox.com/u/13487186/Sammelmappe3.pdf

I have ImageMagick 6.6.7 and the latest version of GhostScrpt.
Can someone help me?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Converting PDF only converts first page

Post by fmw42 »

I think your file is either not created correctly or corrupted. I only see one page with identify.

try this, it works fine for me on IM 6.6.7.4 Q16 Mac OSX tiger



convert rose: rose: rose: rose.pdf
convert rose.pdf rose.jpg

and creates rose-0.jpg rose-1.jpg rose-2.jpg
martinyyyy
Posts: 4
Joined: 2011-01-15T08:15:44-07:00
Authentication code: 8675308

Re: Converting PDF only converts first page

Post by martinyyyy »

I'm using a little trick now.

Converting the whole file at once doesnt work, but

Code: Select all

convert -density 300 "test.pdf"[0] "test1.jpg"
works and

Code: Select all

convert -density 300 "test.pdf"[99999] "test1.jpg"
tells me how many pages the PDF file has. It's a bit of a workaround but works fine.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Converting PDF only converts first page

Post by fmw42 »

If that is the case, then it does sound like there might be a bug in IM identifying the number of pages or something not correct in the way the pdf was created.

As these still say only one page, but Mac PREVIEW shows 4 (though they all look alike)


convert Sammelmappe3.pdf -format %n info:
1
convert Sammelmappe3.pdf -format "%[scenes]" info:
1
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Converting PDF only converts first page

Post by fmw42 »

Post Reply