Developer --> Technical Publications

     


Summary of Changes

The Carbon Printing Manager interface for applications is defined in the header files PMApplication.h , PMCore.h , and PMDefinitions.h . The Classic Printing Manager interface, defined in Printing.h , is not used by Carbon applications.

The following list summarizes the changes you need to be aware of as you convert your existing printing code to use the Carbon Printing Manager. These topics are discussed in more detail in subsequent sections.

  • The Classic print record ( TPrint ) is replaced by two opaque objects: a PMPrintSettings object and a PMPageFormat object. You create these objects using the PMCreatePrintSettings and PMCreatePageFormat functions, which return a reference that you can pass to other Carbon Printing Manager functions to obtain information stored in the objects.
  • Your application must not make assumptions about the size or content of the PMPrintSettings and PMPageFormat objects. Applications can attach extended data to both these objects using new Carbon Printing Manager functions, but applications must not assume a specific size when storing or retrieving these objects with documents.
  • The Carbon Printing Manager provides functions for flattening and restoring the PMPrintSettings and PMPageFormat objects. In most cases, your application should store only the PMPageFormat object. If older versions of your application store a Classic print record with a saved document, you may continue to do so for backward compatibility. However, some information may be lost when converting a PMPageFormat object into a Classic print record, due to limitations of the Classic print record structure.
  • The Classic printing port record ( TPrPort ) is replaced by an opaque PMPrintContext object. The Carbon Printing Manager provides functions for obtaining the graphics port associated with a PMPrintContext object.
  • On Mac OS X, Carbon applications can initiate multiple, simultaneous printing tasks. Each printing task is referred to as a session , and each printing session is independent of other printing sessions. On Mac OS 8 and 9, applications are limited to a single printing session.
  • The Carbon Printing Manager enforces an order in which some routines can be called. Any routine used out of order will return the result code kPMOutOfScope .
  • The "style" dialog box is now called the Page Setup dialog box, and the "job" dialog box is now called the Print dialog box.
  • If your application requires customizing the Page Setup or Print dialog boxes, you should consider creating a printer dialog extension (PDE). Printer dialog extensions provide more customization capability, and are required to support document-modal dialog boxes in Mac OS X. For more information, see Extending Printing Dialog Boxes in MacOSX , available on the Apple website.
  • The PrPicFile function and the "deferred" printing style are not supported in Carbon. All print records must use the "draft" style, and printer drivers must perform their own spooling or, on Mac OS 8 and 9, use the Desktop Printer Spooler. See Tech Note 1097 for information about the Desktop Printer Spooler.
  • Low-level driver functions such as PrLoadDriver are not supported. See for a list of unsupported functions.

  • © 2000 Apple Computer, Inc. (Last Updated 03 July 2000)