note 36534 deleted from function.printer-draw-text by sobak
| From: | sobak@php.net | Date: | Thu, 24 Nov 2016 20:29:52 +0000 |
| Subject: | note 36534 deleted from function.printer-draw-text by sobak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-207563@lists.php.net to get a copy of this message | ||
Note Submitter: firman at fibconsultant dot biz
----
I've a problem with the right alignment for number with draw_text so I make a small function
and it is work for me, hopefully it will help other.
function write_num($input,$printer,$ypos,$xpos){
$s=strlen($input);
$y=$xpos;
for ($i=1;$i<$s+1;$i++){
$u=$i*-1;
printer_draw_text($printer,substr($input,$u,1),$y,$ypos);
$y=$y-15;
}
}
Firman, Indonesia