macro can be used to establish a page transform which controls scaling by mapping a rectangular region of the document to the printable area of the page. The scale matches the screen by default. By specifying a large rectangle, you can get finer granularity in the drawing. 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
There is an example in
CAPI User Guide (Macintosh version) - 30 Aug 2011