PHP Classes

Flipbook PHP PDF to JPG: Convert PDF files to JPEG images using ImageMagick

Recommend this page to a friend!
  Info   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum (13)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 66%Total: 7,673 All time: 234 This week: 55Up
Version License PHP version Categories
pdf2jpg_flipbook 1.1BSD License5.0PHP 5, Graphics, Files and Folders


This class can be used to convert PDF documents to JPEG images using ImageMagick.

It uses ImageMagick convert tool and Ghostscript to generate JPEG images from given PDF files. The resulting images are stored in separate directory.

The class also generates ZIP archive with a the images and XML file in the Flip book format

Innovation Award
PHP Programming Innovation award winner
April 2009

Prize: One copy of the Zend Studio
PDF is a very popular format for distributing documents that are ready to be printed.

Displaying PDF documents on a site, depends on the availability of browser plug-ins or external programs installed on the user machine.

This class provides a solution for extracting images of the pages of a PDF document, so it can be browsed on a Web site without depending on having the right plug-ins or programs installed in the user browser.

Manuel Lemos
Picture of Satish Kumar
  Performance   Level  
Name: Satish Kumar <contact>
Classes: 6 packages by
Country: Australia Australia
Age: 45
All time rank: 2093 in Australia Australia
Week rank: 161 Up1 in Australia Australia Up
Innovation award
Innovation award
Nominee: 3x

Winner: 2x


What is the best PHP convert pdf to html class?
Need to convert PDF to HTML or format to embed in Web site


Class to convert PDF file to JPG files and viewing the jpg files as flip book. Class also helps to zip flip book content into a single package.


Class requires "ImageMagicK, GhostScript and Zip" to be installed in the server. apt-get install imagemagick apt-get install zip

Tested in ubuntu (Linux environment).


Create following folder and give write permission CHMOD 777

  1. zip folder
  2. book folder
  3. book/img folder

Place index.htm inside the folder "book".

provides css effect and book flip effect.

Finally open config.php and change the variables

  Files folder image Files  
File Role Description
Accessible without login Plain text file config.php Conf. Configuration file
Accessible without login Plain text file demo.php Example demo file to check class working
Plain text file digiBook.php Class Class to convert PDF to JPG, and package the files.
Accessible without login HTML file index.htm Data File to placed inside book folder
Accessible without login Plain text file readme.txt Doc. Instruction File

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:234
This week:55Up
User Ratings User Comments (5)
 All time
Excellent in all areas.
15 years ago (Ashwani)
Thanks~~ Master Best~~
15 years ago (ganji)
dont run example, dont create jpg and zip file
15 years ago (m DOGAN)
Excellent class, works fine at first time and it's vey helpfull
13 years ago (Esteban)
great class
14 years ago (silvano gurski)