Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Printing Overview


Purpose

Provides printing to printer devices.

[Top]


Architectural relationships

Printing is treated as drawing to a graphics context, with the printer represented by a specialised graphics device. An application that supports printing should store its view data in (device-independent) twips, only converting into pixels when drawing to either the screen or a printer.

EPOC can print to a range of printers, and has a framework for providing printer drivers. This API allows the installed drivers to be listed, and the appropriate one selected.

Device families may provide stock printing dialogs for users to initiate and control print jobs. It is normal for applications that provide printing to supply print job setup (from the Print Framework API) and their printing implementation (the band printing interface described below) to these dialogs, which can then use them as appropriate.

[Top]


Description

The API has four key concepts: printer model list, printer device, printer port, and band printing interface.


Printer model list

The printer model list gives the possible printers, obtained from the installed printer drivers. To create a printer device, a particular model must be chosen.

The printer model list is provided by CPrinterModelList. An entry in the list is a TPrinterModelEntry.


Printer device

This encapsulates the printer being used as a graphics device. Applications draw to this device to print their output. It has:

It is provided by CPrinterDevice.


Printer port

Some printer models require a port to be specified (e.g. file, serial, parallel). The base class for ports is CPrinterPort.


Band printing interface

Pages are printed in regions of a page, called bands. An application implements the band printing interface to draw the requested region to the printer device. The class is MPageRegionPrinter. The attributes of the band to be printed are passed in a TBandAttributes object.

[Top]


See also

Print Framework Overview