macro can be used to establish a page transform that maps a rectangular region of the document to the whole page being printed. Any number of invocations of
may occur during the printing of a page. For instance, it may be convenient to use a different page transform when printing headers and footers to the page from that used when printing the main body of the page.
A helper function,
, is provided to simplify the calculation of suitable rectangles for use with
. It calculates the width and height of the rectangle in the user's coordinate space that correspond to one printable page, based on the logical resolution of the user's coordinate space in dpi.
For more specific control over the page transform, the printer metrics can be queried using
and the various printer-metrics accessors such as
Margins and the printable area can be set using