Try
ini_set('max_execution_time', 0);
ini_set("memory_limit", "2G");
$mpdf->packTableData = true;
And as usual, be wary of bad nesting, unclosed tags, improper escaping, or wrong colspan settings. Check generated HTML code with http://validator.w3.org/