note 73404 added to function.printer-draw-bmp
| From: | codeslinger at compsalot dot com | Date: | Wed, 21 Feb 2007 19:47:35 +0000 |
| Subject: | note 73404 added to function.printer-draw-bmp | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-123678@lists.php.net to get a copy of this message | ||
Don't get confused by the example. The X Y offset is Base 0 not 1. The example was trying to
show that you could position the image elsewhere.
Also, the X Y offsets accept a negative value which can be very handy if you want to print just part
of the image. Such as when splitting an image across multiple pages.
Most (all?) printers will shift your output by the amount of the "unprintable" area.
Suppose you want to print an image at exactly X = 0.25, Y = 0.25 inches (from the top left).
On a typical printer with an unprintable area of 0.116 inches, the printer adds that amount as an
offset. So, to compensate you just subtract the offset.
$X = 0.25 - 0.116;
$Y = 0.25 - 0.116;
With the result being that your image will be physically located where you intended.
Keep in mind that the unprintable area can be a different amount for the X and Y, for this example
printer they both just happen to be the same.
Now the catch is that printer_get_option does not provide a way to get the unprintable area size.
----
Server IP: 64.71.164.2
Probable Submitter: 168.103.158.33
----
Manual Page -- http://www.php.net/manual/en/function.printer-draw-bmp.php
Edit -- https://master.php.net/note/edit/73404
Del: integrated -- https://master.php.net/note/delete/73404/integrated
Del: useless -- https://master.php.net/note/delete/73404/useless
Del: bad code -- https://master.php.net/note/delete/73404/bad+code
Del: spam -- https://master.php.net/note/delete/73404/spam
Del: non-english -- https://master.php.net/note/delete/73404/non-english
Del: in docs -- https://master.php.net/note/delete/73404/in+docs
Del: other reasons-- https://master.php.net/note/delete/73404
Reject -- https://master.php.net/note/reject/73404
Search -- https://master.php.net/manage/user-notes.php