Linespacing in TCPDF MultiCell

Carles Andres picture Carles Andres · Mar 13, 2012 · Viewed 28.2k times · Source

I haven't found a way to control linespacing in TCPDF's MultiCell as of version 5.9. Nor have I found any method that helps to mimic the same behaviour by using Cell, such as some method that returns the portion of the text that doesn't fit inside a Cell's width.

Any ideas?

I wish I could switch to FPDF (which I prefer), but I can't.

Answer

KostaPC picture KostaPC · Mar 29, 2012
$pdf->setCellHeightRatio(0.8);

in TCPDF source code documentation:

* Set the height of the cell (line height) respect the font height.
     * @param $h (int) cell proportion respect font height (typical value = 1.25).
     * @public
     * @since 3.0.014 (2008-06-04)