CPrinterDevice
and MPageRegionPrinter
are two classes fundamental to every print operation. CPrinterDevice
encapsulates a printing device. Its uses include:
converting to and from the co-ordinates of the printed page (in twips) and the co-ordinates of the target device (in pixels). When in print preview mode, for example, the target device is the screen.
selecting a printer device and retrieving its model name and UID
A device has a page specification, giving the page orientation and the size, encapsulated in the TPageSpec
class.
Pages are printed in regions of a page, called bands. An application implements the band printing interface, MPageRegionPrinter
, to draw the requested region to the printer device. The attributes of the printed band are encapsulated in TBandAttributes
.
Additional, but less important classes, are:
CPrinterPort
, and its sub-classes: used to set whether print output should be sent to a serial or parallel port, or via infrared or to
a file or fax.
CPrinterControl
: used to set the graphics context for the print operation, and controlling its progress and termination.