Menu

almost blank document

Help
Juanito
2005-07-14
2013-04-24
  • Juanito

    Juanito - 2005-07-14

    with this very simple code:
    <?php
    require_once('../html2pdf/html2fpdf.php');
    $buffer="Hello World Hola Mondo";
    $pdf=new HTML2FPDF();
    $pdf->WriteHTML($buffer);
    $pdf->Output();
    ?>

    I get an empty pdf page with the legend 1/1 at the foot.
    any clue?
    PD: Itried both IE an FireFox, Windows and Linux Servers

     
    • gabriel harrison

      Do you still get a blank out put if:

      $buffer = '<html><head></head><body><p>Hello World Hola Mondo</p></body></html>'

      Gabriel

       
      • Juanito

        Juanito - 2005-07-14

        yes i still recive the same blank page with 1/1 at the page foot

         
        • gabriel harrison

          Are there definitely no errors that are not being displayed?

          Try adding

          ini_set('display_errors', 1);
          error_reporting(E_ALL);

          to your script.

           
          • Juanito

            Juanito - 2005-07-15

            still ouput an blank page with 1/1 as foot page with this code:
            <?php
            ini_set('display_errors', 1);
            error_reporting(E_ALL);
            require_once('../html2pdf/html2fpdf.php');
            $buffer = '<html><head></head><body><p>Hello World Hola Mondo</p></body></html>';
            $pdf=new HTML2FPDF();
            $pdf->WriteHTML($buffer);
            $pdf->Output();
            ?>
            i tried a simple pdf using the fpdf class directly and it did work ok (just to be sure)

             
    • Juanito

      Juanito - 2005-07-15

      i tested the script on php version 4.3.11  IIS  and php 4.3.4 on apache 2.0.48 on a Redhat Box same result, i've also opened the file with a hex editor.. there's no text in there.
      i've inserted some var_dumps on function WriteHTML($html)
      the $a array seems to be ok

       
    • Juanito

      Juanito - 2005-07-15

      Solved..!!! simply added to code $pdf->AddPage();
      so everyone out there don't forget to <h3>$pdf->AddPage();</h3>

       

Log in to post a comment.

MongoDB Logo MongoDB