Printer Driver Design and Implementation Strategies

Windows NT includes RasDD for raster printing devices, a PostScript printer driver, and a plotter driver. Most currently available printers belong to the families supported by RasDD, the PostScript driver, or the plotter driver. Exceptions include devices that contain hardware drawing accelerators controlled by proprietary command sequences.

Each of these drivers have data-driven designs, allowing them to support broad classes of devices. Because these drivers customize their operation for specific printer models by interpreting printer data files, support can often be extended to a new printer simply by creating a new description file, rather than creating a new printer driver.

If a printing device is not supported in Windows NT, it should first be determined whether the device can be provided with minimum support using a minidriver and RasDD. There is no source for RasDD in the DDK, but if it is necessary to write a new raster printer driver, the designer can use a combination of the PostScript driver and the framebuffer (framebuf) display driver source as a model for such a driver.

The DDK includes sample source for a PostScript print driver in the print\psprint directory. The pscript subtree contains source code for the PostScript graphics driver, and the pscriptui subtree contains source for the PostScript interface driver. If it is necessary to create a new PostScript driver, modifying this driver should greatly reduce design time and effort.

The PostScript interface driver can provide a basis for a raster printer interface driver, with modification for the hardware. A major difference between PostScript and raster drivers is that a PostScript graphics driver writes to a device-managed surface, and so must implement certain rendering entry points. A raster driver, on the other hand, enables a GDI standard bitmap, allowing GDI to handle most of the rendering. The framebuffer display driver handles rendering in the same way. Some of the design areas that require close attention are the following:

Supporting DDI Printing and User Interface Functions contains information on printer-specific driver entry points for the printer graphics and printer interface portions of a printer driver. It also lists the functions that comprise the user-mode printer driver module.