With upgrading to PHP5, i had to switch to a newer version of pdflib (v6), where some functions slightly differ from the old version(v5).
The new parameters for this function are:
<?php float PDF_stringwidth(PDF *p, const char *text, int font, float size); ?>
pdf_stringwidth() does only take 2 parameters in the old version.
Now 5 parameters are required. As they aren't listed here, i thought i could do that :>
<?php
$fontID = pdf_findfont($pdf, 'Courier', 'host', 0);
$width = pdf_stringwidth($pdf,$string, $fontID, $fontsize));
?>
Maybe that helps someone out.