1

Hello All
I just want to know how to add footer and header to page!

I want the same like this in the example page -> http://www.html2pdf.fr/_html2pdf/exemples/pdf/about.pdf

2

soo read the example about.php wink
Ancien pseudo : lolo

3

Spipu you're good


4

And why ?
Ancien pseudo : lolo

5

Sorry spipu i thinked you was some guy joking me. You said i must see about.php but where is it???

6

Finally I have added header and footer but content text is going over the header. why?

7

In the example folder in the zip file
Ancien pseudo : lolo

8

Ok I solve it perfectly:

THIS IS THE MAIN PAGE: index.php


<?php
ob_start();
?>


<page backtop="30mm" backbottom="20mm" backleft="10mm" backright="10mm">
<page_header>
<?php echo '<p align="right"><img src="header.png" /><hr /></p>'; ?>
</page_header>
<page_footer>
<?php echo '<p align="right"><img src="header.png" /><hr /></p>'; ?>
</page_footer>

<?php include(dirname(__FILE__).'/../html_page.php'); ?>
</page>

<?php
$content = ob_get_clean();
require_once(dirname(__FILE__).'/html2pdf.class.php');

try
{
$pdf = new HTML2PDF('P','A4', 'fr', false, 'ISO-8859-15', array(15, 5, 15, 5));
$pdf->writeHTML($content, isset($_GET['vuehtml']));

$gg = Date('d');
$mm = Date('m');
$aaaa = Date('Y');

$h = Date('H');
$min = Date('i');

$ora = $gg . '-' . $mm . '-' . $aaaa;
$total = 'PDF ' . $ora . '.pdf';

$pdf->Output($total, 'D');
}
catch(HTML2PDF_exception $e) { echo $e; }
?>


THIS IS html_page.php:


<?php

echo "hello";

?>