note 58638 added to function.pdf-stringwidth
| From: | rross at mNoOoSnPsAoMfvega dot com | Date: | Thu, 10 Nov 2005 12:27:36 +0000 |
| Subject: | note 58638 added to function.pdf-stringwidth | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-98375@lists.php.net to get a copy of this message | ||
One thing I came across, and hope is useful to someone, is the following.
If you're looking to use the pdf_stringwidth() function, and expecting it to give you the
proper results when trying to center or position the text, try to avoid using this line in your
code:
<?
pdf_set_parameter($pdf, "textformat", "utf8");
?>
I discovered (after much hair-pulling of what remains of my hair) that this line of code increases
the amount of space between characters by roughly 100%. Removing this line of code made the text on
my generated PDF's significantly tighter and more appealing.
----
Manual Page -- http://www.php.net/manual/en/function.pdf-stringwidth.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+58638
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58638&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58638&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58638&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58638&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58638&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58638&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58638&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+58638&report=yes
Search -- http://master.php.net/manage/user-notes.php