I'm trying to create a pdf with the html2pdf library, but it says "headers already sent" when I add any of the following lines:
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" />
<link href="css/style_vista.css" rel="stylesheet" type="text/css" />
<script src="js/jquery/ver/1.7.2/jquery.min.js" type="text/javascript">
</script>
I build the pdf in the following way pdf.php is the html:
ob_start();
include 'pdf.php';
$content = ob_get_clean();
try
{
$html2pdf = new HTML2PDF('P', 'FOLIO', 'es', true, 'UTF-8',array(10, 20, 10, 10));//array(izq,arr,der,aba)
$html2pdf->pdf->SetDisplayMode('fullpage');
$html2pdf->writeHTML($content);
$html2pdf->Output('recepcion_vista.pdf');
}
catch(HTML2PDF_exception $e) {
echo $e;
exit;
}
ob_end_flush();
Any help is welcome.