[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * HTML2PDF Librairy - example 4 * 5 * HTML => PDF convertor 6 * distributed under the LGPL License 7 * 8 * @author Laurent MINGUET <webmaster@html2pdf.fr> 9 * 10 * isset($_GET['vuehtml']) is not mandatory 11 * it allow to display the result in the HTML format 12 */ 13 14 // for display the post information 15 if (isset($_POST['test'])) { 16 echo '<pre>'; 17 echo htmlentities(print_r($_POST, true)); 18 echo '</pre>'; 19 exit; 20 } 21 22 // get the HTML 23 ob_start(); 24 include(dirname(__FILE__).'/res/forms.php'); 25 $content = ob_get_clean(); 26 27 // convert to PDF 28 require_once(dirname(__FILE__).'/../html2pdf.class.php'); 29 try 30 { 31 $html2pdf = new HTML2PDF('P', 'A4', 'fr'); 32 $html2pdf->pdf->SetDisplayMode('fullpage'); 33 $html2pdf->writeHTML($content, isset($_GET['vuehtml'])); 34 $html2pdf->Output('forms.pdf'); 35 } 36 catch(HTML2PDF_exception $e) { 37 echo $e; 38 exit; 39 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Mar 17 22:47:18 2015 | Cross-referenced by PHPXref 0.7.1 |