Sorry spipu i thinked you was some guy joking me. You said i must see about.php but where is it???
Finally I have added header and footer but content text is going over the header. why?
Spipu Le 28/08/2010 à 19:47 In the example folder in the zip file
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";
?>