Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Imaging With QuickDraw /
Chapter 9 - Printing Manager

Printing Manager Reference

This section describes the data structures and routines defined by the Printing Manager. When you print a document using the Printing Manager, the Printing Manager uses a printer driver to do the actual printing. A printer driver does any necessary translation of QuickDraw drawing routines and--when requested by your application--sends the translated instructions and data to the printer. It is the printer driver for the current printer that actually implements the routines defined by the Printing Manager. Every Printing Manager routine you call determines the current printer from a resource in the System file and then dispatches your call to the printer driver for that printer.

"Data Structures" shows the Pascal data structures defined by the Printing Manager. "Printing Manager Routines" describes the routines you can use to open and close the Printing Manager, display a print dialog box, print a document, and handle printing errors. "Application-Defined Routines" describes how you can provide your own idle procedure that handles events in a dialog box reporting the status of the print job, and how you can provide an initialization function that appends items to a print dialog box.

The burden of maintaining backward compatibility with early Apple printer models--as well as maintaining compatibility with over a hundred existing printer drivers--requires extra care on your part. When the Printing Manager was initially designed, it was intended to support ImageWriter printers directly attached to Macintosh computers with only a single floppy disk and 128 KB of RAM. Later, the Printing Manager was implemented on PostScript LaserWriter printer drivers for more powerful Macintosh computers sharing LaserWriter printers on networks. Since then, the Printing Manager has been implemented on a substantial--and unanticipated--number of additional Apple and third-party printer drivers, each in its own, slightly unique way. When you use Printing Manager routines and data structures, you should be especially wary of and defensive about possible error conditions. Because Apple has little control over the manner in which third parties support the Printing Manager in their printer drivers, you should test your application's printing code on as many printers as possible.

Data Structures
Printing Manager Routines
Application-Defined Routines

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996