## Printer Device Driver

[prev][next][parent][TOC]

### Banding

The 42XX driver resorts to banding when sufficient memory is not available for the entire page bit map. The driver uses Gre journaling functions for banding.

The driver initially tries to acquire memory for one band, which is the size of the entire page. If this fails, the driver successively tries incrementing the number of bands for the page bit map until the request for memory succeeds. The minimum band size supported is 64KB. If a request for 64KB of memory fails, the driver returns an error to the application.

Banding is then implemented as follows for each page in the job:

The driver creates a bit map for the first band and asks the graphics engine to start journaling.

The presentation driver interface routines then draw into this band, clipping as necessary.

When the page is completed (indicated by a NewFrame or BeginCloseDC call), the journaling is stopped and the printer control component outputs the band to the printer.

When the first band has been output, it is discarded and a bit map for the second band is created. The journal is then played back to draw those parts of the picture that fall within the second band. This step is repeated until all the bands have been processed and the entire page has been printed.