*DOWNLOAD: https://github.com/luizomf/php-epub-creator *EXAMPLES: temp_folder=$path_to_temp_folder; $epub->epub_file=$path_to_epub_file . $epub_filename; // E-book configs $epub->title='Epub title'; $epub->creator='Luiz Otávio Miranda'; $epub->language='pt'; $epub->rights='Public Domain'; $epub->publisher='http://www.tutsup.com/'; // $epub->uuid = ''; // You can specify your own uuid // You can specity your own CSS $epub->css = file_get_contents($path_to_class.'base.css'); // add to content... You must not use doctype, head and body tags (only XHTML body content) // [[[ DESCRIPTION: AddPage( XHTML, file, title, download images ); ]]] $epub->AddPage( false, $path_to_class.'file.txt', 'Título (check accent)' ); // Add page from file .... remove doctype, head and body tags $epub->AddPage( 'Test', false, 'Title 2' ); // Add page content directly... $epub->AddPage( '', false, 'Title 3' ); // $epub->AddPage( '', false, 'Title 4', true ); // Here the last param tells the class to download de image $epub->AddPage( '', false, 'Title 5' ); // Make sure only one image is set to cover !!! otherwsie bad file will be created.. (last argument = true). // [[[ DESCRIPTION: AddImage( image path, mimetype, cover ) ]]] $epub->AddImage( $path_to_class.'images/1.jpg', false, true ); $epub->AddImage( $path_to_class.'images/2.jpg', 'image/jpeg', false ); // Add another images (last arg is set to false - not cover - remember that) .... If you don't send the mimetype, the class will try to get it from the file // Create the EPUB ( If yet no error happened..) if ( $epub->error ) { echo $epub->error; } else { $epub->CreateEPUB(); if ($epub->error ) { echo $epub->error; } else { echo 'Success: Download your book here.'; } }