Cells being drawn without its content ( float numbers problem )
PHP class for PDF
Brought to you by:
nicolaasuni
Hi,
I came across a bug that I don't really know how to reproduce, although I did manage to track it down.
The problem is on line 6348, function Write ( in my case called by MultiCell ), when it compares the current Y axis position with the max Y
if (($maxh > 0) AND ($this->y > $maxy) ) {
In my scenario they look like the same number, but still has an absolutely tiny difference, which made the cell being drawn but not its content.
changing the line to:
if (($maxh > 0) AND (($this->y-$maxy) > 0.00001) ) {
fixes the problem.
// File name : tcpdf.php
// Version : 6.2.12
// Begin : 2002-08-03
// Last Update : 2015-06-18
Line 6334 is probably more to blame than my first guess...
this:
$maxy = $this->y + $maxh - max($row_height, $h);
is different than (this fixes the problem)::
$maxy = $this->y + ($maxh - max($row_height, $h));
Last edit: Ricardo Rojo Bonfim 2016-03-18