Read one page from pdf

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
antake
Posts: 7
Joined: 2014-03-02T03:58:12-07:00
Authentication code: 6789

Read one page from pdf

Post by antake »

Hello!

I need to read a pdf document page by page because it is very large.
Can you please help me with it?

Sorry for such a simple question, I'm new to magick and can't find any good sources about it.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Read one page from pdf

Post by snibgo »

convert in.pdf[0] out0.png
convert in.pdf[1] out1.png
etc.
snibgo's IM pages: im.snibgo.com
antake
Posts: 7
Joined: 2014-03-02T03:58:12-07:00
Authentication code: 6789

Re: Read one page from pdf

Post by antake »

Thanks but i don't undestand.
I have file path and need to read it. How can convert help me?
My programming language is c++.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Read one page from pdf

Post by Bonzo »

The code snibgo gave you will convert the page from a pdf to a png. You will need to write the code in C++ which inputs one page at a time.

I know nothing about C++ but I would use a loop; something like foreach page run the code
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Read one page from pdf

Post by snibgo »

Sorry, I don't know. If you are using Magick++, viewforum.php?f=23 might be a place to find out.
snibgo's IM pages: im.snibgo.com
antake
Posts: 7
Joined: 2014-03-02T03:58:12-07:00
Authentication code: 6789

Re: Read one page from pdf

Post by antake »

Thank you for the answers and for the link. Maybe it will help me.
Post Reply