Printing puzzle
David Epstein
dfepstein at comcast.net
Tue Jun 18 21:05:52 EDT 2013
The question: how can I find out, by script, how big the unprintable
margins are when the Page Setup dialog has been set to some scale
other than 100%?
At 100%, there's no problem. For example, the unprintable right
margin = item 2 of the printPaperSize - item 4 of the printRectangle.
But at any other scale I can't use this calculation, because while
the "printRectangle" responds to a Page Setup choice of scale, the
"printPaperSize" does not.
Thus if I set the scale to 50%, the printRectangle of 36,36,1188,1504
tells me the pixels I can fit into a letter size page after shrinking
them by half and avoiding the unprintable margins. This means the
left unprintable margin on the printed output will be 18/72 of an
inch (shrinking the 36 by 50%). But I do not see any way of learning
this information in a script, because the 50% scaling factor is not
being reported, and the printPaperSize doesn't change the way the
printRectangle does when the scale changes. (The "printScale" seems
to return 1 regardless of what I do to the Page Setup dialog).
What I'm trying to do is show on the screen is both a rectangle that
will, when printed, be 1 inch from each edge of the paper; and also
as much space outside of that rectangle as can be printed to. Thus I
need to know how much of that 1 inch cannot be printed to.
Many thanks for any suggestions.
David Epstein
More information about the use-livecode
mailing list