Jeckky / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

when i add a footer, a white page empty with just the footer is add in the pdf #461

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,
I have a little problem with the footer.
I print the footer in the pdf using this :
  <script type="text/php">

        if ( isset($pdf) ) {

          $font = Font_Metrics::get_font("helvetica", "bold");
          $pdf->page_text(420,788,$PageNumber, $font,6, array(0,0,0));

        }
        </script>

My problem is that function add 1 white page with the footer in the pdf.
I did not find a way to delete this last page.

Do you have a solution to this problem.

i'm using dompdf 0.6

Best regards

Dany

Original issue reported on code.google.com by dany.vaz...@gmail.com on 11 Apr 2012 at 1:33

GoogleCodeExporter commented 8 years ago
This code by itself shouldn't produce an extra blank page. Can you post the 
rest of your document?

Original comment by eclecticgeek on 11 Apr 2012 at 10:56

GoogleCodeExporter commented 8 years ago
I find the solution...

This occur when I put this code:  

<script type="text/php">

        if ( isset($pdf) ) {

          $font = Font_Metrics::get_font("helvetica", "bold");
          $pdf->page_text(420,788,$PageNumber, $font,6, array(0,0,0));

        }
        </script> 

after the html close : </html>.

Dany

Original comment by dany.vaz...@gmail.com on 12 Apr 2012 at 8:51

GoogleCodeExporter commented 8 years ago
That could cause problems. The current expected location of any inline script 
is within the body of the HTML document. Still, I believe all that should 
happen is the script will be relocated.

This may be happening if the last page of the PDF prior to parsing of the 
script is filled.

Original comment by eclecticgeek on 12 Apr 2012 at 5:46

GoogleCodeExporter commented 8 years ago

Original comment by eclecticgeek on 30 May 2013 at 5:16