Functions


Compatibility Functions (Non-Session)

PMError Obtains the result code from the last Carbon Printing Manager function called by your application.
PMGeneral Maintains compatibility with the Classic Printing Manager’s PrGeneral function.
PMSetError Sets the value of the current Carbon Printing Manager result code.

Compatibility Functions

PMSessionError Obtains the result code from the last Carbon Printing Manager function called in the specified printing session.
PMSessionGeneral Maintains compatibility with the Classic Printing Manager’s PrGeneral function.
PMSessionSetError Sets the value of the current Carbon Printing Manager result code for the specified printing session.

Creating and Using Page Format and Print Settings Objects

PMCreatePageFormat Creates a new PMPageFormat object.
PMCreatePrintSettings Creates a new PMPrintSettings object.
PMDefaultPageFormat Assigns default parameter values to an existing PMPageFormat object, for the current printer.
PMDefaultPrintSettings Assigns default parameter values to a PMPrintSettings object.
PMDisposePageFormat Releases memory previously allocated for a PMPageFormat object.
PMDisposePrintSettings Releases memory previously allocated for a PMPrintSettings object.
PMNewPageFormat Creates a new PMPageFormat object.
PMNewPrintSettings Creates a new PMPrintSettings object.
PMSessionDefaultPageFormat Assigns default parameter values to a PMPageFormat object for the specified printing session.
PMSessionDefaultPrintSettings Assigns default parameter values to a PMPrintSettings object for the specified printing session.
PMSessionValidatePageFormat Obtains a PMPageFormat object that is valid within the context of the specified printing session.
PMSessionValidatePrintSettings Obtains a PMPrintSettings object that is valid within the context of the specified printing session.
PMValidatePageFormat Obtains a valid PMPageFormat object.
PMValidatePrintSettings Obtains a valid PMPrintSettings object.

Creating, Calling, and Deleting Universal Procedure Pointers

DisposePMSheetDoneUPP Disposes of a universal procedure pointer to a sheet done callback function.
InvokePMSheetDoneUPP Calls a sheet done callback function.
NewPMSheetDoneUPP Creates a new universal procedure pointer to a sheet done callback function.

Customizing the Page Setup and Print Dialog Boxes (Non-Session)

PMPageSetupDialogInit Initializes a custom Page Setup dialog box.
PMPageSetupDialogMain Displays your application’s customized Page Setup dialog box.
PMPrintDialogInit Initializes a custom Print dialog box.
PMPrintDialogInitWithPageFormat Initializes a custom Print dialog box.
PMPrintDialogMain Displays your application’s custom Print dialog box.

Customizing the Page Setup and Print Dialog Boxes

PMGetDialogAccepted Reports to application-defined callback functions whether the user has confirmed a dialog box.
PMGetDialogDone Reports to application-defined callback functions whether the user has finished with a dialog box.
PMGetDialogPtr Obtains the dialog record structure for a dialog box.
PMGetItemProc Obtains the event handling callback function for a custom dialog box.
PMGetModalFilterProc Obtains the event handling callback function for a modal dialog box.
PMSessionPageSetupDialogInit Initializes a custom Page Setup dialog box.
PMSessionPageSetupDialogMain Displays your application’s custom Page Setup dialog box.
PMSessionPrintDialogInit Initializes a custom Print dialog box.
PMSessionPrintDialogMain Displays your application’s custom Print dialog box.
PMSetDialogAccepted Informs the Carbon Printing Manager that the user confirmed a custom dialog box.
PMSetDialogDone Informs the Carbon Printing Manager that the user finished with a custom dialog box.
PMSetItemProc Installs an event handling callback function for items in a custom dialog box.
PMSetModalFilterProc Installs an event handling callback function for a modal dialog box.

Displaying the Page Setup and Print Dialog Boxes (Non-Session)

PMPageSetupDialog Displays the Page Setup dialog box and records the user’s selections in a PMPageFormat object.
PMPrintDialog Displays the Print dialog box and records the user’s selections in a PMPrintSettings object.

Displaying the Page Setup and Print Dialog Boxes

PMSessionPageSetupDialog Displays the Page Setup dialog box and records the user’s selections in a PMPageFormat object.
PMSessionPrintDialog Displays the Print dialog box and records the user’s selections in a PMPrintSettings object.
PMSessionUseSheets Specifies that a printing dialog be displayed as a sheet.

Extending the Page Format and Print Settings Objects

PMGetPageFormatExtendedData Obtains extended page format data previously stored by your application.
PMGetPrintSettingsExtendedData Obtains extended print settings data previously stored by your application.
PMSetPageFormatExtendedData Stores your application-specific data in a page format object.
PMSetPrintSettingsExtendedData Stores your application-specific data in a print settings object.

Getting Information About a Printer

PMPrinterGetDescriptionURL Obtains a reference to the specified printer’s description file, typically a PostScript Printer Description (PPD) file for a PostScript printer.
PMPrinterGetDriverCreator Obtains the creator of the driver associated with the specified printer.
PMPrinterGetDriverReleaseInfo Obtains release information for the driver associated with the specified printer.
PMPrinterGetIndexedPrinterResolution Obtains a resolution setting based on an index into the range of settings supported by the specified printer.
PMPrinterGetLanguageInfo Obtains information about the specified printer’s imaging language.
PMPrinterGetPrinterResolution Obtains the resolution setting for the specified printer according to the tag parameter.
PMPrinterGetPrinterResolutionCount Obtains the number of resolution settings supported by the specified printer.
PMSessionGetCurrentPrinter Creates a new PMPrinter object for the current printer, associated with the specified printing session.

Getting Information About the Current Printer (Non-Session)

PMGetDriverCreator Obtains the creator of the driver associated with the current printer.
PMGetDriverReleaseInfo Obtains release information for the driver associated with the current printer.
PMGetIndexedPrinterResolution Obtains a resolution setting based on an index into the range of settings supported by the current printer.
PMGetLanguageInfo Obtains information about the current printer’s imaging language.
PMGetPrinterResolution Obtains the resolution setting for the current printer according to the tag parameter.
PMGetPrinterResolutionCount Obtains the number of resolution settings supported by the current printer.

Making Copies of Page Format and Print Settings Objects

PMCopyPageFormat Copies the settings from one PMPageFormat object into another.
PMCopyPrintSettings Copies the settings from one PMPrintSettings object into another.

Managing Printing Objects

PMRelease Decrements a printing object’s reference count.
PMRetain Increments a printing object’s reference count.

Page Format Accessor Functions (Non-Session)

PMGetPhysicalPageSize Obtains the size of the imageable area in points, unaffected by rotation, resolution, or scaling.
PMGetPhysicalPaperSize Obtains the size of the paper in points, unaffected by rotation, resolution, or scaling.
PMSetPhysicalPaperSize Requests a particular paper size, unaffected by rotation, resolution or scaling.

Page Format Accessor Functions

PMGetAdjustedPageRect Obtains the page size, taking into account orientation, application drawing resolution, and scaling settings.
PMGetAdjustedPaperRect Obtains the paper size, taking into account orientation, application drawing resolution, and scaling settings.
PMGetOrientation Obtains the current setting for page orientation.
PMGetResolution Obtains the current application drawing resolution.
PMGetScale Obtains the scaling factor currently applied to the page and paper rectangles.
PMGetUnadjustedPageRect Obtains the size of the imageable area in points, unaffected by rotation, resolution, or scaling.
PMGetUnadjustedPaperRect Obtains the size of the paper in points, unaffected by rotation, resolution, or scaling.
PMSetAdjustedPageRect Requests a particular page size, independent of the current rotation, resolution, or scaling settings.
PMSetOrientation Sets the page orientation for printing.
PMSetResolution Sets the application drawing resolution.
PMSetScale Sets the scaling factor for the page and paper rectangles.
PMSetUnadjustedPaperRect Requests a particular paper size, unaffected by rotation, resolution or scaling.

Print Loop Functions (Non-Session)

PMBegin Prepares the Carbon Printing Manager for use.
PMBeginDocument Establishes a graphics context for imaging a document. This context is an opaque grafPort.
PMBeginPage Initializes a scaling rectangle for printing a page.
PMEnd Closes the Carbon Printing Manager and releases its allocated memory.
PMEndDocument Closes the context created for imaging a document.
PMEndPage Finishes printing the current page.
PMSetIdleProc Installs an idle callback function in your print loop.

Print Loop Functions

PMCreateSession Initializes a PMPrintSession object and creates a context for printing operations.
PMSessionBeginDocument Establishes a graphics context for imaging a document in the specified printing session.
PMSessionBeginPage Initializes a scaling rectangle for printing a page in the specified printing session.
PMSessionEndDocument Closes the context created for imaging a document in the specified printing session.
PMSessionEndPage Finishes printing the current page.
PMSessionSetIdleProc Installs an idle callback function in your print loop.

Print Record Compatibility Functions (Non-Session)

PMConvertOldPrintRecord Creates a new PMPageFormat object and a new PMPrintSettings object from an existing Classic print record.
PMMakeOldPrintRecord Creates a Classic print record from a PMPageFormat and a PMPrintSettings object.

Print Record Compatibility Functions

PMSessionConvertOldPrintRecord Creates new PMPageFormat and PMPrintSettings objects from a Classic print record.
PMSessionMakeOldPrintRecord Creates a Classic print record from a PMPageFormat and a PMPrintSettings object.

Print Session Accessor Functions (Non-Session)

PMGetGrafPtr Obtains the printing port from an opaque printing context.
PMIsPostScriptDriver Reports whether the current printer driver supports the PostScript language.

Print Session Accessor Functions

PMSessionGetDataFromSession Obtains data your application previously stored in a print session object.
PMSessionGetDocumentFormatGeneration Obtains the spool file formats that can be generated by the print spooler.
PMSessionGetDocumentFormatSupported Obtains the spool file formats that are accepted by the current printer driver.
PMSessionGetGraphicsContext Obtains the current graphics context.
PMSessionIsDocumentFormatSupported Reports whether the current printer driver supports a specified spool file format.
PMSessionSetDataInSession Stores your application-specific data in a print session object.
PMSessionSetDocumentFormatGeneration Requests a specified spool file format and identifies the graphics contexts that will be used to draw pages within the print loop.

Print Settings Accessor Functions

PMGetColorMode Obtains the color mode for the print job.
PMGetCopies Obtains the number of copies that the user has requested to be printed.
PMGetDestination Obtains the destination of a print job.
PMGetFirstPage Obtains the number of the first page to be printed.
PMGetJobNameCFString Obtains the name of the print job.
PMGetLastPage Obtains the number of the last page to be printed.
PMGetPageRange Obtains the valid range of pages that can be printed.
PMSetColorMode Sets the desired color mode for the print job.
PMSetCopies Sets the default value to be displayed in the Print dialog box for the number of copies to be printed.
PMSetFirstPage Sets the default page number of the first page to be printed, as displayed in the Print dialog box.
PMSetJobNameCFString Specifies the name of a print job.
PMSetLastPage Sets the default page number of the last page to be printed, as displayed in the Print dialog box.
PMSetPageRange Sets the valid range of pages that can be printed.

Print Settings Accessor Functions (Non-Session)

PMGetJobName Obtains the name of the print job.
PMSetJobName Specifies the name of the print job.

Printing with PostScript and ColorSync (Non-Session)

PMDisableColorSync Disables ColorSync color matching for the current page.
PMEnableColorSync Enables ColorSync color matching for the current page.
PMPostScriptBegin Puts the current driver into PostScript mode, ready to accept PostScript data instead of QuickDraw data.
PMPostScriptData Passes PostScript data, referenced by a pointer, to the current printer driver.
PMPostScriptEnd Restores the current driver to QuickDraw mode, ready to accept QuickDraw data instead of PostScript data.
PMPostScriptFile Passes PostScript data, contained in a file, to the current printer driver.
PMPostScriptHandle Passes PostScript data, referenced by a handle, to the current printer driver.

Printing with PostScript and ColorSync

PMSessionDisableColorSync Disables ColorSync color matching for the current page.
PMSessionEnableColorSync Enables ColorSync color matching for the current page.
PMSessionPostScriptBegin Puts the current printer driver into PostScript mode, ready to accept PostScript data instead of QuickDraw data.
PMSessionPostScriptData Passes PostScript data, referenced by a pointer, to the current printer driver.
PMSessionPostScriptEnd Restores the current driver to QuickDraw mode, ready to accept QuickDraw data instead of PostScript data.
PMSessionPostScriptFile Passes PostScript data, contained in a file, to the current printer driver.
PMSessionPostScriptHandle Passes PostScript data, referenced by a handle, to the current printer driver.
PMSessionSetPSInjectionData Specifies a set of PostScript code injection points and the associated data.
PMSetProfile Embeds a color profile during printing.

Saving and Restoring Page Format and Print Settings Objects

PMFlattenPageFormat Flattens a PMPageFormat object for storage in a user document.
PMFlattenPrintSettings Flattens a PMPrintSettings object for storage in a user document.
PMUnflattenPageFormat Rebuilds a flattened PMPageFormat object.
PMUnflattenPrintSettings Rebuilds a flattened PMPrintSettings object.

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