[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3master/var/www/se3/html2pdf/examples/ -> exemple00.php (source)

   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      include(dirname(__FILE__).'/res/exemple00.php');
  17      $content = ob_get_clean();
  18  
  19      // convert in PDF
  20      require_once(dirname(__FILE__).'/../html2pdf.class.php');
  21      try
  22      {
  23          $html2pdf = new HTML2PDF('P', 'A4', 'fr');
  24  //      $html2pdf->setModeDebug();
  25          $html2pdf->setDefaultFont('Arial');
  26          $html2pdf->writeHTML($content, isset($_GET['vuehtml']));
  27          $html2pdf->Output('exemple00.pdf');
  28      }
  29      catch(HTML2PDF_exception $e) {
  30          echo $e;
  31          exit;
  32      }


Generated: Tue Mar 17 22:47:18 2015 Cross-referenced by PHPXref 0.7.1