dscott1966 - Yes. I've fixed it and will be releasing the fix soon.
Mustang394 - There must be some other variable that has zero characters...I couldn't figure out any other reason why this could happen. Try to figure out what that is. If you can't here is a workaround -- replace the function sizeOfText with this function:
Code:
function sizeOfText( $texte, $largeur )
{
$index = 0;
$nb_lines = 0;
$loop = TRUE;
if ($largeur != 0) {
while ( $loop )
{
$pos = strpos($texte, "\n");
if (!$pos)
{
$loop = FALSE;
$ligne = $texte;
}
else
{
$ligne = substr( $texte, $index, $pos);
$texte = substr( $texte, $pos+1 );
}
$length = floor( $this->GetStringWidth( $ligne ) );
$res = 1 + floor( $length / $largeur) ;
$nb_lines += $res;
} }
return $nb_lines;
}
Bookmarks