Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linespacing in TCPDF MultiCell

Tags:

tcpdf

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.

like image 594
Carles Andres Avatar asked Mar 13 '12 10:03

Carles Andres


1 Answers

$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)
like image 133
KostaPC Avatar answered Nov 03 '22 13:11

KostaPC