html2pdf
html2pdf copied to clipboard
count(): Parameter must be an array or an object that implements Countable / Html2Pdf.php:5150
Hi,
I got this error when trying to create a PDF.
count(): Parameter must be an array or an object that implements Countable
What is the cause of the problem? Do you have an idea?
Thank you.
I skipped this problem as follows:
if (is_array(self::$_tables[$param['num']]['height']) && count(self::$_tables[$param['num']]['height'])>1) {
$y = $this->_margeTop+self::$_tables[$param['num']]['height'][count(self::$_tables[$param['num']]['height'])-1];
} elseif (is_array(self::$_tables[$param['num']]['height']) && count(self::$_tables[$param['num']]['height']) == 1) {
$y = self::$_tables[$param['num']]['curr_y']+self::$_tables[$param['num']]['height'][count(self::$_tables[$param['num']]['height'])-1];
} else {
$y = self::$_tables[$param['num']]['curr_y'];
}
But now I get an error like this. The current sentence takes more than 1000 lines is the current box
$html2pdf->setSentenceMaxLines(700000);
Even this did not solve my mistake. It took a long time.
normally it has been resolved in the last version of html2pdf
which version do you use ?