printPaperRectangle & LC7
J. Landman Gay
jacque at hyperactivesw.com
Sat Mar 21 14:17:12 EDT 2015
On 3/21/2015 3:38 AM, Terence Heaford wrote:
> The docs state
>
> "The four numbers represent the left, top, right and bottom of the
> rectangle being printed to. The rectangle is relative to the top-left
> of the page, and the left and top will currently always be 0.
This isn't very well written. What it really means is:
"The four numbers represent the left, top, right and bottom of the
printing area the printer supports. The rectangle is relative to the
top-left of the paper, which is 0,0."
So your printer has a print area of 8,8,834,587. The printmargins you
set will be offset by that area. If you set the left print margin to 10,
on the actual paper it will be 18 (10 for your margin + 8 from the printer.)
What I usually do is ignore the right and bottom margins and set them to
zero if I'm sure the whole printout will fit on a page. If my top and
left calculations are correct, it doesn't matter what those are. Then I
calculate the amount of inset I need for the top and left, set those
printmargins (minus the printer offsets) and print the page.
So if you want your printout to begin at 20 pixels from the left of the
physical paper, the left printmargin would be 12. The right side should
just fall into place by itself if you've scaled the image correctly.
I should warn that printing is voodoo and while you can get very close,
it may never be perfect on all printers and in all cases. Printers are
independent with minds of their own.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list