Developer --> Technical Publications

     


New and Changed Printing Functions

Because the Carbon Printing Manager replaces all of the Classic Printing Manager functions you are using today, the first step in converting your code is to locate and replace your Classic Printing Manager function calls with their Carbon equivalents. In most cases there is a one-to-one mapping between the new functions and the original functions they replace. Table 2-1 lists the Carbon equivalents for Classic Printing Manager functions.

Table 2-1   Carbon replacements for Classic Printing Manager functions
Classic Function Session Function Non-Session Function
PrOpen PMCreateSession PMBegin
PrClose PMRelease PMEnd
PrOpenDoc PMSessionBeginDocument PMBeginDocument
PrCloseDoc PMSessionEndDocument PMEndDocument
PrOpenPage PMSessionBeginPage PMBeginPage
PrClosePage PMSessionEndPage PMEndPage
PrintDefault PMSessionDefaultPrintSettings PMDefaultPrintSettings
PMSessionDefaultPageFormat PMDefaultPageFormat
PrValidate PMSessionValidatePrintSettings PMValidatePrintSettings
PMSessionValidatePageFormat PMValidatePageFormat
PrJobInit PMSessionPrintDialogInit PMPrintDialogInit
PrJobDialog PMSessionPrintDialog PMPrintDialog
PrStlInit PMSessionPageSetupDialogInit PMPageSetupDialogInit
PrStlDialog PMSessionPageSetupDialog PMPageSetupDialog
PrDlgMain PMSessionPrintDialogMain PMPrintDialogMain
PMSessionPageSetupDialogMain PMPageSetupDialogMain
PrGeneral PMSessionGeneral PMGeneral
PrSetError PMSessionSetError PMSetError
PrError PMSessionError PMError
MyDoPrintIdle PMIdleProcPtr PMIdleProcPtr
MyPrDialogAppend PMPageSetupDialogInitProcPtr PMPageSetupDialogInitProcPtr
PMPrintDialogInitProcPtr PMPrintDialogInitProcPtr

Some of the functionality provided by Classic Printing Manager is no longer supported. Table 2-2 lists the Classic functions that are not supported by the Carbon Printing Manager.

Table 2-2   Classic Printing Manager functions that are not supported in Carbon
PrPicFile
PrPurge
PrNoPurge
PrLoadDriver
PrDrvrDCE
PrDrvrOpen
PrDrvrClose
PrDrvrVers
PrCtlCall
PrJobMerge

The PrPicFile function was removed because the "deferred" printing style is no longer supported. All print records must use "draft" style, and printer drivers must perform their own spooling or, on Mac OS 8 and 9, use the Desktop Printer Spooler. Refer to the Classic Printing Manager documentation for information about draft and deferred printing styles. The Desktop Printer Spooler is described in Tech Note 1097.

A direct replacement for the PrJobMerge function is unnecessary because the PMPageFormat and PMPrintSettings objects can be used independently. You can print multiple documents, each with their own saved page format, using a single PMPrintSettings object.


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