height of MultiCell
Added by Frank Geisweid about 9 years ago
Is there a way to check which height an advanced MultiCell will have?
Like function NbLines($w, $txt) , which I used for the "Normal" Multicell.
I ask this, because I need an extra text, which should be printed in front of a text, every time this textblock will cause a pagebreak....
Replies (1)
RE: height of MultiCell - Added by Andrei Bintintan about 9 years ago
You can use the following function from the multicell object. It will return you an array which represents each line of the multicell. Multiply that with the line height and you have the multicell height.
public function stringToLines( $nWidth = 0, $pStr )
Keep in mind to substract the paddings if you use any.