I am trying to convert some html content to pdf using HTML2PDF class. But I am getting the below error
Fatal error: Uncaught ERROR n°4
File : /html2pdf/_class/parsingHtml.class.php
Line : 120
HTML code invalid, the tags are not closed in an orderly fashion.
Code I am using is below :
<?php
require_once('html2pdf.class.php');
$filename = 'test.html';
$report=file_get_contents($filename);
$content = '';
$content .="<page footer='page' backtop='20%' backbottom='13%' backleft='1%' backright='1%'>";
$content .= $report;
$content .="</page>";
ob_get_clean();
$pdf = new HTML2PDF('P','A4','en','true','UTF-8');
$pdf->WriteHTML($content,false);
ob_end_clean();
$pdf->Output('Demographic_Analysis.pdf');
exit;
?>
Please help