Login   Register  
PHP Classes
elePHPant
Icontem

File: example_basic

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of PHP-4-Business  >  WKHTMTOPDF HTML to PDF creator  >  example_basic  >  Download  
File: example_basic
Role: Example script
Content type: text/plain
Description: Basic usage
Class: WKHTMTOPDF HTML to PDF creator
Convert HTML to PDF using the Webkit engine
Author: By
Last change:
Date: 2 years ago
Size: 311 bytes
 

Contents

Class file image Download
<?php

    
try {
        
$wkhtmltopdf = new wkhtmltopdf(array('path' => APPLICATION_PATH '/../public/uploads/'));
        
$wkhtmltopdf->setTitle("Title");
        
$wkhtmltopdf->setHtml("Content");
        
$wkhtmltopdf->output(wkhtmltopdf::MODE_DOWNLOAD"file.pdf");
    } catch (
Exception $e) {
        echo 
$e->getMessage();
    }
    
?>