note 54353 added to function.pdf-continue-text
| From: | timodotschmidatgmaildotcom at osu1 dot php dot net | Date: | Fri, 01 Jul 2005 07:19:39 +0000 |
| Subject: | note 54353 added to function.pdf-continue-text | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-91241@lists.php.net to get a copy of this message | ||
I found no possibility to align a Text right. So I wrote a function:
<?php
function pdf_align_right($string, $chars = 10){
$string = str_pad($string, $chars, " ", STR_PAD_LEFT);
// Spaces in PDF-Documents are only the Half of a Normal Letter: So we replace them with 2 Spaces
$string = preg_replace("/ /", " ", $string);
return $string;
}
?>
Note that the 2nd Parameter is NOT the Lenght of the returned String because the Spaces will be
replaced with 2 Spaces.
----
Manual Page -- http://www.php.net/manual/en/function.pdf-continue-text.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+54353
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54353&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54353&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54353&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54353&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54353&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54353&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+54353&report=yes
Search -- http://master.php.net/manage/user-notes.php