Carbon


Carbon Printing Manager

Carbon introduces a new printing model that allows applications to print on Mac OS 8 with existing printer drivers and on Mac OS X with new printer drivers.

On Mac OS 8, the Carbon Printing Manager calls through to the original Printing Manager functions. But on Mac OS X, Carbon applications automatically use a new printing architecture and print through different drivers.

The following is a summary of the major changes you need to be aware of. More information is available on the Carbon website:

• The Print Record (TPrint) is no longer directly accessible by applications, and has been split into two separate opaque objects: a PrintSettings object and a PageFormat object. Applications will be given references to these two privately-defined data structures. These references are then used to query the Printing Manager for information contained within the objects.

• A consequence of splitting the Print Record and making it private is there are no fixed sizes. Applications will be able to "extend" both the PrintSettings and PageFormat objects, but applications must not assume a specific size when storing and retrieving PageFormat objects with documents.

• The Carbon Printing Manager will supply functions for flattening and restoring both the PrintSettings and PageFormat objects. When storing printing information with documents, it will suffice to store just the PageFormat object. If older versions of your application store a print record with a saved document, you may continue to do so to provide backward compatibility.

• Application developers should reduce the use of calls that append items to print dialog boxes. We expect to provide a new panel-based interface in the near future.

• There are many improvements to the QuickDraw interfaces for Carbon, including new accessor functions and data structures that should be used.

• All print records use the "draft" style, not the "deferred" style, which implies that a print driver must handle the spooling if it wants to provide spooling for the user. Many, if not all, print drivers perform their own spooling and don't require applications to call PrPicFile to implement spooling. Because it is rarely used, we are eliminating system level spooling code from the Carbon Printing Manager.

• The Carbon Printing Manager now enforces an order in which some routines are called. Any routine used out of scope will return an error.

• All Carbon Printing Manager routines are only valid within a PMBegin/PMEnd block.

• PrintSettings and PageFormats objects are automatically disposed of during a PMEnd call.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)