Convert PDF file to some jpg files...

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
tamtam
Posts: 6
Joined: 2011-02-02T06:34:32-07:00
Authentication code: 8675308

Convert PDF file to some jpg files...

Post by tamtam »

Hello,

I want to convert 20 pages PDF file to 20 jpg files.
I success to convert only one page each convertion.

Is there any way to convert one time all the pages of the PDF file to 20 jpg files ?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert PDF file to some jpg files...

Post by fmw42 »

Probably not a good pdf or corrupted. post a link to you pdf.

see similar issue at viewtopic.php?f=3&t=17993
tamtam
Posts: 6
Joined: 2011-02-02T06:34:32-07:00
Authentication code: 8675308

Re: Convert PDF file to some jpg files...

Post by tamtam »

I have a good pdf file, but maybe I don't write the right command for doing it.
Is it good:

convert myfile.pdf pic.jpg

Is it enough to get this way some files:
pic1.jpg , pic2.jpg and so...

Or Do i need to write something else?

Thanks!
tamtam
Posts: 6
Joined: 2011-02-02T06:34:32-07:00
Authentication code: 8675308

Re: Convert PDF file to some jpg files...

Post by tamtam »

For example...
This is the pdf I had tried to convert (I took it from Google)
http://knfdesigns.com/pdf/knf_catalog_garden.pdf
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert PDF file to some jpg files...

Post by fmw42 »

Identify knf_catalog_garden.pdf

shows 31 pages.

convert knf_catalog_garden.pdf knf_catalog_garden.jpg
or
convert knf_catalog_garden.pdf knf_catalog_garden-%d.jpg

should produce results such as

knf_catalog_garden-0.jpg
...
knf_catalog_garden-30.jpg

However, that does not work for me in IM 6.6.7.4 Q16 Mac OSX Tiger. Nor does it work as

convert knf_catalog_garden.pdf +append knf_catalog_garden.png

since I still only get one frame.


But if I do

convert rose: rose: rose: rose.pdf
identify rose.pdf
rose.pdf[0] PDF 70x46 70x46+0+0 16-bit Bilevel DirectClass 1.43KB 0.020u 0:00.040
rose.pdf[1] PDF 70x46 70x46+0+0 16-bit Bilevel DirectClass 1.43KB 0.010u 0:00.040
rose.pdf[2] PDF 70x46 70x46+0+0 16-bit Bilevel DirectClass 1.43KB 0.010u 0:00.040
convert rose.pdf rose.jpg

then I get

rose-1.jpg
rose-2.jpg
rose-0.jpg

So something seems wrong with your PDF or with IM (or ghostscript) reading the number of pages. So I would report this to the Bugs forum and link back to here.

However, I can still get each page by doing them one at a time as follows:


convert knf_catalog_garden.pdf[0] knf_catalog_garden_0.jpg
...
convert knf_catalog_garden.pdf[30] knf_catalog_garden_30.jpg


This is the third or so recent report of this issue. So I would definitely suggest you post to the Bugs forum
tamtam
Posts: 6
Joined: 2011-02-02T06:34:32-07:00
Authentication code: 8675308

Re: Convert PDF file to some jpg files...

Post by tamtam »

Can you give me a pdf file that has'nt created by IM and ok for convert it ?

Thanks!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert PDF file to some jpg files...

Post by fmw42 »

see Bug report at viewtopic.php?f=3&t=18001
tamtam
Posts: 6
Joined: 2011-02-02T06:34:32-07:00
Authentication code: 8675308

Re: Convert PDF file to some jpg files...

Post by tamtam »

it is OK now!
Thank you very much!!!!!!
Post Reply