Login   Register  
PHP Classes
elePHPant
Icontem

File: demo.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Satish Kumar  >  PDF to JPG (Flip book)  >  demo.php  >  Download  
File: demo.php
Role: Example script
Content type: text/plain
Description: demo file to check class working
Class: PDF to JPG (Flip book)
Convert PDF files to JPEG images using ImageMagick
Author: By
Last change:
Date: 5 years ago
Size: 849 bytes
 

Contents

Class file image Download
<?php
require_once(dirname(__FILE__).'/digiBook.php');//configuration file

$pdf_file=PDF_FILE//PDF FILE LOCATION
$jpgloc=IMAGE_LOCATION."page.jpg";// LOCATION TO PLACE EXTRACTED JPG FILES
$book=new digiBook(); 
echo 
"Initializing book...<br>";

$book->convertPDF2JPG($pdf_file,$jpgloc);//CONVERT PDF TO JPG
echo "Converting PDF to JPG files...<br>";

$imgloc=IMAGE_LOCATION;// LOCATION TO PLACE EXTRACTED JPG FILES
$xmlfile=XML_LOCATION."source.xml";//LOCATION OF XML FILE INSIIDE  FLIP BOOK
digiBook::createXMLFile($xmlfile,$imgloc);
echo 
"Configuring  Flip book...<br>";


$ziploc=ZIP_LOCATION;// LOCATION TO PLACE ZIP FILE
digiBook::createZIP($ziploc);
echo 
"Creating zip...<br>";

echo 
"Finish...<br><br><br>";

echo 
"<a href='book/index.htm'  target='_blank'>Click here </a>to view the flip book ...".$file."<br>";
?>