[ 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 <style type="text/css"> 18 <!-- 19 table 20 { 21 padding: 0; 22 margin: 0; 23 border: none; 24 border-right: solid 0.2mm black; 25 } 26 td 27 { 28 padding: 0; 29 margin: 0; 30 border: none; 31 } 32 33 img 34 { 35 width: 10mm; 36 } 37 --> 38 </style> 39 <page> 40 <table cellpadding="0" cellspacing="0"><tr> 41 <?php for($k=0; $k<28; $k++) echo '<td><img src="./res/regle.png" alt="" ><br>'.$k.'</td>'; ?> 42 </tr></table> 43 </page> 44 <?php 45 $content = ob_get_clean(); 46 47 // convert to PDF 48 require_once(dirname(__FILE__).'/../html2pdf.class.php'); 49 try 50 { 51 $html2pdf = new HTML2PDF('L', 'A4', 'fr', true, 'UTF-8', 10); 52 $html2pdf->pdf->SetDisplayMode('fullpage'); 53 $html2pdf->writeHTML($content, isset($_GET['vuehtml'])); 54 $html2pdf->Output('regle.pdf'); 55 } 56 catch(HTML2PDF_exception $e) { 57 echo $e; 58 exit; 59 }
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 |