(PHP 3 >= 3.0.8, PHP 4, PHP 5 <= 5.0.4)
The cpdf_stringwidth() function returns the width of the string in text. It requires a font to be set before.
See also cpdf_set_font().