1

Im using the following code to generate the pdf-file. The $content is a complete html-File.
// delete Output-Buffer
ob_end_clean();

require_once ('./pdf/html2pdf.class.php');
$html2pdf = new HTML2PDF('P', 'A4', 'de', $marges = array(25, 5, 25, 8));

$content = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. ....";

$html2pdf->WriteHTML($content); $html2pdf->Output('file.pdf');


Could I set the footer and the header by PHP code too?

2

yes you can

just read the examples and the wiki (page, page_header and page_footer tags)
Ancien pseudo : lolo