note 54920 added to function.pdf-stringwidth

From: Date: Tue, 19 Jul 2005 16:42:53 +0000
Subject: note 54920 added to function.pdf-stringwidth
Groups: php.notes 
Request: Send a blank email to php-notes+get-92178@lists.php.net to get a copy of this message
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 # first, we have to find the font, we are using $fontID = pdf_findfont($pdf, 'Courier', 'host', 0); # then we can call pdf_stringwidth $width = pdf_stringwidth($pdf,$string, $fontID, $fontsize)); ?> Maybe that helps someone out. ---- Manual Page -- http://www.php.net/manual/en/function.pdf-stringwidth.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+54920 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54920&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54920&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54920&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54920&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54920&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54920&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+54920&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#92178) next »