Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get the length of a string in TCPDF?

Tags:

tcpdf

In TCPDF there is GetCellHeight() for measuring the height of a cell.

How do you measure the length or width of a string (or block of string) in TCPDF?

like image 300
Denish Avatar asked May 02 '11 09:05

Denish


1 Answers

The method to get the string length is GetStringWidth(). Check also the getNumLines() and getStringHeight() methods.

like image 133
Nicola Asuni Avatar answered Oct 30 '22 01:10

Nicola Asuni