Extract page from .pdf with PHP

Can I extract one or more pages from a .PDF file and save each page as a .JPG / .PNG / ...?

I already found ImageMagick, but I want to know if there are any solutions where you do not need to install any extensions / plugins in PHP. I am currently using PHP5.

Thanks a lot!

Niels

+4
source share
2 answers

In PHP there is nothing for reading PDF files (for creation, like php 5). You can find some classes that will do this, and you won’t need to install the PEAR module, just include the file. Alternatively, you can try and use imagemagick from the command line using exec or backticks, many hosts have already installed it for use in the shell.

+3
source

Not sure about creating images from pages in pdf files, but you can use xpdf to read text from pdf files in php: http://www.foolabs.com/xpdf/about.html

Something else you might want to look into is fpdf: http://www.fpdf.org/ , which may have the features you are looking for

+1
source

All Articles