Convert PDF into Image Files

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
rameshmrgn
Forum Newbie
Posts: 15
Joined: Sat Jun 17, 2006 1:01 am

Convert PDF into Image Files

Post by rameshmrgn »

hi all,

i have a PDF file,.

i would like to convert that pdf file into image files.

Each page should be converted into an image.

Kindly, help me. 8)

Smiles,
Ramesh Mu.
brendandonhue
Forum Commoner
Posts: 71
Joined: Mon Sep 25, 2006 3:21 pm

Post by brendandonhue »

ImageMagick can do this (use the 'convert' utility.)
rameshmrgn
Forum Newbie
Posts: 15
Joined: Sat Jun 17, 2006 1:01 am

how to use converter from PHP

Post by rameshmrgn »

hi,

how to use the `converter` from PHP?
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

http://www.php.net/shell_exec should be a good starting point...
User avatar
ibbo
Forum Commoner
Posts: 51
Joined: Tue Sep 19, 2006 6:20 am

Post by ibbo »

Use exec to get convert to run (you may have to supply the pull path to convert).

Also when pulling pages out fo a pdf you can use the [n] to grab the page within the pdf file.

So

exec("convert file.pdf[2] page2.jpg");

Grabs page 3 of the pdf and saves it as page2.jpg.

ibbo
rameshmrgn
Forum Newbie
Posts: 15
Joined: Sat Jun 17, 2006 1:01 am

Post by rameshmrgn »

How to get the Number of pages in the PDF using PHP?
Post Reply