Cell padding should not be multiplied with number of lines in getStringHeight
PHP class for PDF
Brought to you by:
nicolaasuni
Following line in function getStringHeight which was modified in version 6.0.050 calculates to big height as getCellHeight adds TB cell padding which is then multiplied with $lines:
$height = $lines * $this->getCellHeight($this->FontSize);
BTW. As a temporary workaround I created getCellHeight_no_padding which is called only from getStringHeight function and it works as it did before 6.0.050.
OK. Fixed on TCPDF 6.0.053.
Thank you for reporting this issue.
Unfortunately this bug reappeared in 6.0.054. See part of a diff:
- $height = $this->getCellHeight(($lines * $this->FontSize), $autopadding);
+ $height = $lines * $this->getCellHeight($this->FontSize, $autopadding);
Should I suggest a test in one of the examples?
In the 6.0.055 vertion of TCPDF the line is:
$height = $this->getCellHeight(($lines * $this->FontSize), $autopadding);
That is correct and consistent, as shown in the example n. 5.