I am using mPDF in my web application.
I have to create invoice documents with the help of Mpdf..
So html table with large number of rows (ie: if it exists single page) rise this error:
Warning: Invalid argument supplied for foreach() in MPDF56/mpdf.php on
line 11008
I am using following code to generate pdf:
require_once(MPDF_PATH);
$mpdf=new mPDF('c','A4','0','',2,2,2,2,1,1);
$stylesheet = file_get_contents(dirname(__FILE__).'/invoice_print.css');
$mpdf->WriteHTML($stylesheet,1);
$html .="";
$mpdf->WriteHTML($html);
$mpdf->Output("$fileName",'D');
I have tried with/without arguments in constructor of Mpdf.
And I found mpdf works with first 4 params without any problem...
$mpdf=new mPDF('c','A4','0','')
But when I add "margins" (ie: 5-8) params, will throws error described above.
Have anyone has a fix for this???
I have tried with mPDF 5.3 and 5.6