I was getting this error while using the library with Drupal module Views PDF 7.x-3.1 and TCPDF 6.6.2 (running php 8.0 or 8.1)
TypeError: Unsupported operand types: float + string in TCPDF->Write() (line 6442 of ... /tcpdf/tcpdf.php).
The issue has been solved by the following modification to line 6442 of tcpdf.php:
from this
$maxy = $this->y + $maxh - max($row_height, $h);
to this
$maxy = $this->y + (float)$maxh - max($row_height, $h);
I was getting this error while using the library with Drupal module Views PDF 7.x-3.1 and TCPDF 6.6.2 (running php 8.0 or 8.1)
TypeError: Unsupported operand types: float + string in TCPDF->Write() (line 6442 of ... /tcpdf/tcpdf.php).
The issue has been solved by the following modification to line 6442 of tcpdf.php: from this
$maxy = $this->y + $maxh - max($row_height, $h);
to this$maxy = $this->y + (float)$maxh - max($row_height, $h);
Following this suggestion https://phpcod.com/fatal-error-uncaught-typeerror-unsupported-operand-types-string-float/