[ 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 // get the HTML 15 ob_start(); 16 ?> 17 <page> 18 <h1>Test de JavaScript 2</h1><br> 19 <br> 20 Normalement une alerte devrait apparaitre, indiquant "coucou" 21 </page> 22 <?php 23 $content = ob_get_clean(); 24 25 // convert to PDF 26 require_once(dirname(__FILE__).'/../html2pdf.class.php'); 27 try 28 { 29 $html2pdf = new HTML2PDF('P', 'A4', 'fr'); 30 $html2pdf->pdf->IncludeJS("app.alert('coucou');"); 31 $html2pdf->writeHTML($content, isset($_GET['vuehtml'])); 32 $html2pdf->Output('js2.pdf'); 33 } 34 catch(HTML2PDF_exception $e) { 35 echo $e; 36 exit; 37 }
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 |