satsu

indexlaporanpenduduk

Aug 2nd, 2015
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.52 KB | None | 0 0
  1. <?PHP ob_start(); // buka library laporan
  2. //koneksi
  3. include"conn.php";
  4. include(dirname(__FILE__).'/laporanpenduduk.php');// memanggil file laporan
  5. $content = ob_get_clean();
  6.  
  7. // conversion HTML => PDF
  8. require_once(dirname(__FILE__).'./html2pdf/html2pdf.class.php');
  9. try
  10. {
  11. $html2pdf = new HTML2PDF('L','Letter', 'fr', false, 'ISO-8859-15');
  12. $html2pdf->writeHTML($content, isset($_GET['vuehtml']));
  13. $html2pdf->Output('hasil-laporan.pdf');//output laporan setelah di download
  14. }
  15. catch(HTML2PDF_exception $e) { echo $e; }?>
Advertisement
Add Comment
Please, Sign In to add comment