Find Articles in:
All
Business
Reference
Technology
News
Lifestyle

HP DeskWriter C printer driver development - development of Macintosh driver for HP color ink-jet printer - Technical

Hewlett-Packard Journal, August, 1992 by William J. Allen, Toni D. Courville, Steven O. Miller

Running on the host computer, the drive provides all of the intelligent formatting, rasterizing, color matching, and dithering for this affordable black and color printer.

A printer driver is a program that provides an interface between an application program and a printer. In the Macintosh and Microsoft(R) Windows environments, the application/driver interface is well-defined. This allows a single driver to serve all applications in a particular environment.

The HP DeskWriter C and DeskJet 500C printers use the same print cartridges and mechanical components to mark the page. Basic print modes and color imaging techniques are the same for both products. To improve clarity, this article focuses on the DeskWriter C (Macintosh) driver. Where appropriate, significant differences in the DeskJet 500C (Microsoft Windows) driver will be pointed out.

To be competitive in the marketplace, a low-cost printer manufacturer must provide drivers for the two most popular windowing environments, Microsoft Windows and the Macintosh operating system. Manufacturers of high-end printers can always include the widely used page description language PostScript(R) to guarantee support of the printer. However, including PostScript in a low-cost color printer like the HP DeskWriter C would be prohibitive, significantly increasing the price of the product.

The alternative is to build into the printer only the logic necessary to put the dots onto the paper fast enough to keep the mechanism busy. This requires the driver, running on the host machine, to provide all of the intelligent formatting, rasterizing (converting logical graphics objects to a bit image), color matching, and halftoning. This approach, of using the host machine's CPU power to create the raster image to be laid down by the printer, is the one that we take with the HP DeskWriter C.

HP DeskWriter C Printer Driver

The HP DeskWriter C driver is a program that sits between the user, the application, and the operating system as shown in Fig. 1. This diagram shows the major paths of communication and control managed by the driver.

The user creates a document using the application, then chooses Page Setup, causing the application to call the printer driver's Page Setup command. The printer driver puts up the Page Setup dialog box for the user and returns the modified page size and printer attributes to the application. The application can use this information to reformat the document for the new attributes. The user then prints the document by selecting Print, causing the application to call the printer driver's Print command. The printer driver puts up the Print dialog box for the user, and when the user is finished making selections the printer driver allows the application to send it a series of page descriptions. These page descriptions are a sequence of imaging commands which describe the page as a series of objects such as text, lines, circles, and raster images (PixMaps). The imaging commands are in QuickDraw, the drawing command language of the Macintosh (similar to GDI, or Graphics Device Interface, in Microsoft Windows).

Now the printer driver will immediately return control of the computer back to the user if the user has enabled background printing, or it will continue processing the print job in the foreground. In any case, the printer driver opens a communication path to the printer (either serial or Apple-Talk), determines which print cartridge is installed in the printer, and then proceeds to use a combination of QuickDraw and its own built-in functions to rasterize the page description into a 150-dpi or 300-dpi PixMap.

This PixMap is then adjusted to compensate for the differences between the display and HP printing technology. This may include color matching for the current media, which attempts to make the printed colors appear the same as the colors on the monitor.

The PixMap is finally halfoned, which involves using various patterns of printed dots to simulate all colors that can be produced on the monitor. For instance, since the printer only has cyan, magenta, and yellow inks, it can't directly produce a purple dot. Purple is produced by printing a mixture of red and blue dots in a checkerboard pattern. Each red dot is made by printing a yellow dot on top of a magenta dot and each blue dot is made by printing a magenta dot on top of a cyan dot. This halftoned data is then compressed and transmitted to the printer.

While a communication path is open to the printer, the driver continuously receives status information from the printer so it can report error conditions such as "out of paper" or "wrong print cartridge installed" (e.g., the color print cartridge is installed, but the document only contains black data).

Rasterization

Fig. 2 gives a closer look at how the printer driver rasterizes a page. The transformation from page description to PCL data takes place in several steps. The rasterizing module uses QuickDraw to do much of the work since the page description is in a set of QuickDraw commands anyway, but it replaces some of QuickDraw's functionality where necessary, such as in the rendering of text. Before Apple's System 7.0, QuickDraw did not provide scalable outline fonts, so the HP DeskWriter C rasterizer contains its own outline font renderer called [Intellifon[TM] from AGFA Compugraphic. This provides all Macintosh users with access to high-quality scalable outline fonts for the most commonly used typefaces.

 

BNET TalkbackShare your ideas and expertise on this topic

The following tags are supported in BNET comments:
<b></b> <i></i> <u></u> <pre></pre>

Leave a Reply

  1. You are currently a guest | Login?
advertisement
CIO SessionsVision Series on ZDNet

See and hear what CIOs the world over thinks about the business of technology and how it's changing the way we live and work.

Go
advertisement
  • Click Here
  • Click Here
advertisement

Content provided in partnership with Thompson Gale