Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Next Page > Hide TOC

Carbon Printing Reference

Framework
Carbon/Carbon.h
Companion guide
Declared in
PMApplication.h
PMApplicationDeprecated.h

Overview

Carbon Printing is a C API used by Carbon applications to display a user interface for printing. Carbon Printing provides functions to:

Carbon applications also need to use Core Printing to fully implement their printing features. For information about Core Printing, see Core Printing Reference.

Note: Carbon Printing and the Carbon Human Interface Toolbox are not available to 64-bit applications. To build a 64-bit application with a user interface, you must use Cocoa. For information about printing in Cocoa applications, see Printing Programming Topics for Cocoa.

Functions by Task

Displaying the Page Setup and Print Dialogs

Print Loop Functions

Creating, Calling, and Deleting Universal Procedure Pointers

Customizing the Page Setup and Print Dialogs

The functions in this section make it possible to extend a printing dialog using the so-called AppendDITL method. Instead of using these functions, you should create a printing dialog extension. If you use these functions to extend a printing dialog, you cannot use sheets.

Legacy Carbon Printing Functions

The functions in this section are deprecated and have been replaced by session-based functions that take a PMPrintSession object. In some cases, the replacement function is also deprecated.

Functions

DisposePMSheetDoneUPP

Disposes of a universal procedure pointer (UPP) to a sheet-done callback.

void DisposePMSheetDoneUPP (
   PMSheetDoneUPP userUPP
);

Parameters
userUPP

A UPP to your sheet-done callback.

Discussion

See the callback PMSheetDoneProcPtr for more information.

Availability
Declared In
PMApplication.h

InvokePMSheetDoneUPP

Calls a sheet-done callback.

void InvokePMSheetDoneUPP (
   PMPrintSession printSession,
   WindowRef documentWindow,
   Boolean accepted,
   PMSheetDoneUPP userUPP
);

Discussion

You should not need to use the function InvokePMSheetDoneUPP, as the printing system calls your sheet-done callback function for you. See the callback PMSheetDoneProcPtr for more information.

Availability
Declared In
PMApplication.h

NewPMSheetDoneUPP

Creates a new universal procedure pointer (UPP) to a sheet-done callback.

PMSheetDoneUPP NewPMSheetDoneUPP (
   PMSheetDoneProcPtr userRoutine
);

Parameters
userRoutine

A pointer to your sheet-done callback.

Return Value

On return, a UPP to the sheet-done callback.

Discussion

See the callback PMSheetDoneProcPtr for more information.

Availability
Declared In
PMApplication.h

PMSessionBeginCGDocument

Begins a print job in which all drawing is to a Quartz graphics context. A printing status dialog informs the user of the job’s progress.

OSStatus PMSessionBeginCGDocument (
   PMPrintSession printSession,
   PMPrintSettings printSettings,
   PMPageFormat pageFormat
);

Parameters
printSession

The printing session for the new print job.

printSettings

The print settings for the new print job.

pageFormat

The page format for the new print job.

Return Value

A result code. See Core Printing Result Codes.

Discussion

This function starts a print job in which your application draws in a Quartz graphics context, and should be called within your application’s print loop. This function is similar to the function PMSessionBeginCGDocumentNoDialog except that the printing status dialog is displayed.

You must call this function between the creation and release of a printing session. See the function PMCreateSession. If you present a printing dialog before you call this function, when calling this function you should use the same PMPrintSession object you used to present the dialog.

Before you call PMSessionBeginCGDocument, you should call PMSessionValidatePrintSettings and PMSessionValidatePageFormat to make sure the specified print settings and page format objects are updated and valid. After you call PMSessionBeginCGDocument, if you call a function that changes the specified print settings or page format object, the change is ignored for the current print job.

This function must be called before its corresponding End function (PMSessionEndDocument). If the function PMSessionBeginCGDocument returns noErr, you must later call the End function, even if errors occur within the scope of the Begin and End functions.

The printing system automatically handles printing multiple copies. Your application does not need to perform any tasks other than specifying the number of copies in the printing session.

Availability
See Also
Declared In
PMApplication.h

PMSessionBeginPage

Starts a new page for printing in the specified printing session.

OSStatus PMSessionBeginPage (
   PMPrintSession printSession,
   PMPageFormat pageFormat,
   const PMRect *pageFrame
);

Parameters
printSession

The printing session for the print job.

pageFormat

The page format for the new page. If you pass NULL, the printing system uses the page format you passed to PMSessionBeginCGDocument.

pageFrame

You should pass NULL, as this parameter is currently unsupported.

Return Value

A result code. If the user cancels the print job, this function returns kPMCancel.

Discussion

You must call this function between the creation and release of a printing session. See the function PMCreateSession. You must call the functions PMSessionBeginPage and PMSessionEndPage within the scope of calls to the Begin print job function (PMSessionBeginCGDocument) and the End print job function (PMSessionEndDocument).

You should call the function PMSessionError immediately before you call PMSessionBeginPage. If PMSessionError returns an error, then you should not call the function PMSessionBeginPage. Because PMSessionBeginPage also initializes the printing graphics context, your application should not make assumptions about the state of the context (for example, the current font) between successive pages. After each call to PMSessionBeginPage, your application should call PMSessionGetCGGraphicsContext to obtain the current printing context.

If the function PMSessionBeginPage returns noErr, you must later call the function PMSessionEndPage, even if errors occur within the scope of PMSessionBeginPage and PMSessionEndPage.

The printing system automatically handles printing multiple copies. Your application does not need to perform any tasks other than specifying the number of copies in the printing session.

Special Considerations

Prior to Mac OS X v10.5, the pageFormat parameter is ignored. In Mac OS X v10.5 and later, the printing system supports multiple orientations within a print job. When you call this function and supply a page format, the orientation specified in the page format is used for the current page. Other settings in the page format, such as paper size or scaling, are ignored.

Availability
Declared In
PMApplication.h

PMSessionDisablePrinterPresets

Disables the use of printer presets in the Print dialog.

OSStatus PMSessionDisablePrinterPresets (
   PMPrintSession session
);

Parameters
session

The printing session you use to present the Print dialog.

Return Value

A result code. See Core Printing Result Codes.

Discussion

When you call this function with the specified printing session, the Print dialog for that session does not show any printer presets. Presets are disabled by default.

Availability
See Also
Declared In
PMApplication.h

PMSessionEnablePrinterPresets

Enables the use of printer presets in the Print dialog.

OSStatus PMSessionEnablePrinterPresets (
   PMPrintSession session,
   CFStringRef graphicsType
);

Parameters
session

The printing session you use to present the Print dialog.

graphicsType

The printer presets in the dialog should be suitable for rendering this type of graphic. Currently, the only defined graphics type is "Photo".

Return Value

A result code. See Core Printing Result Codes.

Discussion

When you call this function with the specified printing session, the Print dialog shows the presets available for the specified graphics type.

Availability
See Also
Declared In
PMApplication.h

PMSessionEndDocument

Ends a print job started by calling the function PMSessionBeginCGDocument or PMSessionBeginDocument.

OSStatus PMSessionEndDocument (
   PMPrintSession printSession
);

Parameters
printSession

The current printing session. On return, the printing session is no longer valid; however, you must still call the function PMRelease to release the object.

Return Value

A result code. See Core Printing Result Codes.

Discussion

You must call this function between the creation and release of a printing session. See the function PMCreateSession. The function PMSessionEndDocument is used to end a print job, and it should be called within your application’s print loop after the call to PMSessionEndPage and before releasing the printing session.

This function must be called after its corresponding Begin function (PMSessionBeginCGDocument or PMSessionBeginDocument). If the Begin function returns noErr, the function PMSessionEndDocument must be called, even if errors occur within the scope of the Begin and End functions. You should not call PMSessionEndDocument if the Begin function returns an error.

Availability
Declared In
PMApplication.h

PMSessionEndPage

Indicates the end of drawing the current page for the specified printing session.

OSStatus PMSessionEndPage (
   PMPrintSession printSession
);

Parameters
printSession

The printing session for the print job.

Return Value

A result code. See Core Printing Result Codes.

Discussion

You must call this function between the creation and release of a printing session. See the function PMCreateSession. You must call the functions PMSessionBeginPage and PMSessionEndPage within the scope of calls to the Begin print job function (PMSessionBeginCGDocument) and the End print job function (PMSessionEndDocument).

If the function PMSessionBeginPage returns noErr, you must later call the function PMSessionEndPage, even if errors occur within the scope of PMSessionBeginPage and PMSessionEndPage. You should not call PMSessionEndPage if PMSessionBeginPage returns an error.

Availability
Declared In
PMApplication.h

PMSessionPageSetupDialog

Displays the Page Setup dialog and records the user’s selections in a page format object.

OSStatus PMSessionPageSetupDialog (
   PMPrintSession printSession,
   PMPageFormat pageFormat,
   Boolean *accepted
);

Parameters
printSession

The printing session for which you want to display the dialog.

pageFormat

The page format object in which the user’s selections are recorded.

accepted

A pointer to your Boolean variable. On return, true if the user clicks the OK button, or false if the user clicks Cancel. If you are using a sheet dialog, you should ignore the value returned in this parameter.

Return Value

A result code. See Core Printing Result Codes.

Discussion

You must call this function between the creation and release of a printing session. See the function PMCreateSession. Before you call the function PMSessionPageSetupDialog you should call the function PMSessionValidatePageFormat to make sure page format settings are updated and valid. You should call the function PMSessionPageSetupDialog outside the scope of your print loop.

The Page Setup dialog shows the current settings contained in the page format object. If the user changes these settings and clicks the OK button, the page format object is updated by the printing system with the user’s selections. If the user clicks the Cancel button, the page format object is returned unchanged.

Availability
Declared In
PMApplication.h

PMSessionPrintDialog

Displays the Print dialog and records the user’s selections in a print settings object.

OSStatus PMSessionPrintDialog (
   PMPrintSession printSession,
   PMPrintSettings printSettings,
   PMPageFormat constPageFormat,
   Boolean *accepted
);

Parameters
printSession

The printing session for which you want to display the dialog.

printSettings

The print settings object in which the user’s selections are recorded.

constPageFormat

The page format object for the specified printing session.

accepted

A pointer to your Boolean variable. On return, true if the user accepts the dialog or false if the user cancels the dialog. If you are using a sheet dialog, you should ignore the value of this parameter.

Return Value

A result code. See Core Printing Result Codes.

Discussion

You must call this function between the creation and release of a printing session. See the function PMCreateSession. Before you call the function PMSessionPrintDialog you should call the function PMSessionValidatePrintSettings to make sure print settings are updated and valid. You should call the function PMSessionPrintDialog outside the scope of your print loop.

The Print dialog shows the current settings in the print settings object. If the user changes these settings and accepts the dialog, the print settings object is updated by the printing system with the user’s selections. If the user cancels the dialog, the print settings object is returned unchanged.

Availability
Declared In
PMApplication.h

PMSessionUseSheets

Specifies that a printing dialog should be displayed as a sheet and specifies a function to call when the user dismisses the printing dialog.

OSStatus PMSessionUseSheets (
   PMPrintSession printSession,
   WindowRef documentWindow,
   PMSheetDoneUPP sheetDoneProc
);

Parameters
printSession

The printing session for which you want to display the dialog.

documentWindow

The window to which the sheet dialog should be attached.

sheetDoneProc

A universal procedure pointer to your sheet-done function. The printing system calls this function when the user dismisses the dialog. Your sheet-done function is defined by the callback type PMSheetDoneProcPtr.

Return Value

A result code. See Core Printing Result Codes.

Discussion

You must call this function between the creation and release of a printing session. See the function PMCreateSession.

When a printing dialog is displayed as a sheet, calls to the functions PMSessionPageSetupDialog and PMSessionPrintDialog return control immediately to your application, with the value of the accepted parameter undefined. The printing dialog sheet continues to be displayed until the user dismisses the dialog, at which time the printing system calls your sheet-done function. The page format and print settings objects associated with the dialog should not be used or changed until the sheet-done function is called.

Availability
Declared In
PMApplication.h

PMShowPageSetupDialogAsSheet

Displays a Page Setup dialog as a sheet attached to a window.

OSStatus PMShowPageSetupDialogAsSheet (
   PMPrintSession printSession,
   PMPageFormat pageFormat,
   WindowRef documentWindow,
   PMSheetDoneUPP sheetDoneProc
);

Parameters
printSession

The printing session for which you want to display the dialog.

pageFormat

The initial page format settings.

documentWindow

The window to which the Page Setup dialog sheet should be attached.

sheetDoneProc

A pointer to a sheet-done callback function that you provide. Your function is called when the user dismisses the dialog. See PMSheetDoneProcPtr for information about how to implement this callback.

Return Value

A result code. See Core Printing Result Codes.

Discussion

This function is asynchronous; it displays the dialog in a sheet and returns immediately. When the user dismisses the dialog, the printing system calls the function specified in the sheetDoneProc parameter, passing it a Boolean value that indicates whether the user pressed the OK button.

Special Considerations

In Mac OS X v10.5 and later, you should use this function if you want to display the Page Setup dialog as a document-modal sheet. This function replaces the older method of calling PMSessionUseSheets and PMSessionPageSetupDialog.

Availability
Declared In
PMApplication.h

PMShowPrintDialogWithOptions

Displays a Print dialog with a specified set of controls.

OSStatus PMShowPrintDialogWithOptions (
   PMPrintSession printSession,
   PMPrintSettings printSettings,
   PMPageFormat pageFormat,
   PMPrintDialogOptionFlags printDialogOptions,
   Boolean *accepted
);

Parameters
printSession

The printing session for which you want to display the dialog.

printSettings

The initial print settings for the Print dialog.

pageFormat

The initial page format settings for the Print dialog.

printDialogOptions

Flags that specify what controls are displayed in the expanded version of the Print dialog. See “Print Dialog Options” for a description of the flags you can use to specify the dialog options.

accepted

A pointer to a Boolean value. On return, true if the user accepts the dialog or false if the user cancels the dialog.

Return Value

A result code. See Core Printing Result Codes.

Discussion

In Mac OS X v10.5 and later, you can use this function to display the Print dialog with an optional set of controls in the expanded version of the dialog. When the Print dialog is first displayed, the user sees a simplified dialog with a disclosure button. If the button is pressed, the dialog expands and includes the controls specified in the printDialogOptions parameter. This function only allows you to specify controls for which flags are defined. The expanded dialog may also contain other controls that are not optional.

When you call this function, you should be prepared for the possibility that the page format settings may change. The expanded Print dialog could allow the user to modify page format settings explicitly. Even if the dialog is displayed with the default set of options, there may be other controls in the Print dialog that cause the page format settings to change.

This function is synchronous; it doesn’t return until the user dismisses the dialog.

Availability
Declared In
PMApplication.h

PMShowPrintDialogWithOptionsAsSheet

Displays a Print dialog with a specified set of controls as a sheet attached to a window.

OSStatus PMShowPrintDialogWithOptionsAsSheet (
   PMPrintSession printSession,
   PMPrintSettings printSettings,
   PMPageFormat pageFormat,
   PMPrintDialogOptionFlags printDialogOptions,
   WindowRef documentWindow,
   PMSheetDoneUPP sheetDoneProc
);

Parameters
printSession

The printing session for which you want to display the dialog.

printSettings

The initial print settings for the Print dialog.

pageFormat

The initial page format settings for the Print dialog.

printDialogOptions

Flags that specify what controls are displayed in the expanded version of the Print dialog. See “Print Dialog Options” for a description of the flags you can use to specify dialog options.

documentWindow

The window to which the Print dialog sheet should be attached.

sheetDoneProc

A pointer to a sheet-done callback function that you provide. Your function is called when the user dismisses the dialog. See PMSheetDoneProcPtr for information about how to implement this callback.

Return Value

A result code. See Core Printing Result Codes.

Discussion

In Mac OS X v10.5 and later, you can use this function to display the Print dialog with an optional set of controls in the expanded version of the dialog. When the Print dialog is first displayed, the user sees a simplified dialog with a disclosure button. If the button is pressed, the dialog expands and includes the controls specified in the printDialogOptions parameter. This function only allows you to specify controls for which flags are defined. The expanded dialog may also contain other controls that are not optional.

When you call this function, you should be prepared for the possibility that the page format settings may change. The expanded Print dialog could allow the user to modify page format settings explicitly. Even if the dialog is displayed with the default set of options, there may be other controls in the Print dialog that cause the page format settings to change.

This function is asynchronous; it displays the dialog in a sheet and returns immediately. When the user dismisses the dialog, the printing system calls the function specified in the sheetDoneProc parameter, passing it a Boolean value that indicates whether the user accepted or canceled the dialog.

Special Considerations

In Mac OS X v10.5 and later, you should use this function if you want to display the Print dialog as a document-modal sheet. This function replaces the older method of calling PMSessionUseSheets and PMSessionPrintDialog.

Availability
Declared In
PMApplication.h

Callbacks by Task

Sheet Dialog Callback

Legacy Callbacks

Callbacks

PMItemProcPtr

Defines a pointer to a dialog item proc function that handles items you add to your custom Page Setup or Print dialog. (Deprecated. Use a printing dialog extension instead.)

typedef void (*PMItemProcPtr) (
   DialogRef theDialog,
   SInt16 item
);

You would declare your event handling function like this if you were to name it MyPMItemCallback:

void MyPMItemCallback (
   DialogRef theDialog,
   SInt16 item
);

Parameters
theDialog

A reference to your customized Page Setup or Print dialog (PMDialog). You can use the function PMGetDialogPtr to get a dialog reference.

item

The number of the dialog item.

Discussion

You should provide an item proc callback function if you add items to a custom dialog you create using the AppendDITL method. In Mac OS X, you should create a custom dialog by writing a printing dialog extension.

Your function is called by the printing system after you create a custom Page Setup or Print dialog and register your dialog item proc function by calling the function PMSetItemProc. In Mac OS X, your function is called for items you add to your custom Page Setup or Print dialog. Your item proc function should call the function PMSessionSetError if the user cancels, otherwise the printing system won’t know about the user cancellation.

To provide a pointer to your item proc function, you create a universal procedure pointer (UPP) of type PMItemUPP, using the function NewPMItemUPP. You can do so with code similar to the following:

PMItemUPP MyPMItemCallbackUPP;
MyPMItemCallbackUPP = NewPMPItemUPP (&MyPMItemCallback);

After you are finished with your item proc function, you can dispose of the UPP with the function DisposePMItemUPP. However, if you will use the same event handling function for subsequent displays of a printing dialog, you can reuse the same UPP, rather than dispose of it and later create a new UPP.

Availability
Declared In
PMApplicationDeprecated.h

PMPageSetupDialogInitProcPtr

Defines a pointer to a dialog initialization function for your custom Page Setup dialog. (Deprecated. Use a printing dialog extension instead.)

typedef void (*PMPageSetupDialogInitProcPtr) (
   PMPageFormat pageFormat,
   PMDialog *theDialog
);

You would declare your dialog initialization function like this if you were to name it MyPageSetupDialogInitCallback:

void MyPageSetupDialogInitCallback (
   PMPageFormat pageFormat,
   PMDialog *theDialog
);

Parameters
pageFormat

A PMPageFormat object.

theDialog

A pointer to the PMDialog object representing your custom Page Setup dialog. You obtain this object from the function PMSessionPageSetupDialogInit. Your application should store a pointer to the dialog object in a global variable or as extended data in the PMPageFormat object, where it is accessible by your initialization function.

Discussion

You should set up a dialog initialization callback only if you need to use a custom dialog you create using the AppendDITL method. In Mac OS X, you should create a custom dialog by writing a printing dialog extension. Your initialization function can append items to the Page Setup dialog. If you use this function to extend a printing dialog in Mac OS X, you cannot use sheets.

You pass a pointer to your dialog initialization function as a parameter to the function PMSessionPageSetupDialogMain. Your dialog initialization function is called before your custom Page Setup dialog is displayed. Your initialization function can append items to the Page Setup dialog, and should install an item proc using the function PMSetitemProc.

To provide a pointer to your dialog initialization function, you create a universal procedure pointer (UPP) of type PMPageSetupDialogInitUPP, using the function NewPMPageSetupDialogInitUPP. You can do so with code similar to the following:

PMPageSetupDialogInitUPP MyPageSetupDialogInitCallbackUPP;
MyPageSetupDialogInitCallbackUPP =      NewPMPageSetupDialogInitUPP (MyPageSetupDialogInitCallback);

After you are finished with your dialog initialization function, you can dispose of the UPP with the function DisposePMPageSetupDialogInitUPP. However, if you plan to use the same dialog initialization function for subsequent display of the Page Setup dialog, you can reuse the same UPP, rather than dispose of it and later create a new UPP.

Availability
Declared In
PMApplicationDeprecated.h

PMPrintDialogInitProcPtr

Defines a pointer to a dialog initialization function for your custom Print dialog. (Deprecated. Use a printing dialog extension instead.)

typedef void (*PMPrintDialogInitProcPtr) (
   PMPrintSettings printSettings,
   PMDialog *theDialog
);

You would declare your dialog initialization function like this if you were to name it MyPrintDialogInitCallback:

void MyPrintDialogInitCallback (
   PMPrintSettings printSettings,
   PMDialog *theDialog
);

Parameters
printSettings

A PMPrintSettings object.

theDialog

A pointer to the PMDialog object representing your custom Print dialog. You obtain this object from the function PMSessionPrintDialogInit. Your application should store a pointer to the dialog object in a global variable or as extended data in the PMPrintSettings object, where it is accessible by your initialization function.

Discussion

You should set up a dialog initialization callback if you need to use a custom dialog you create using the AppendDITL method. In Mac OS X, you should create a custom dialog by writing a printing dialog extension. Your initialization function can append items to the Print dialog. If you use this function to extend a printing dialog in Mac OS X, you cannot use sheets.

You pass a pointer to your dialog initialization function as a parameter to the function PMSessionPrintDialogMain. Your dialog initialization function is called before your custom Print dialog is displayed. Your initialization function can append items to the Print dialog, and should install an item proc using the function PMSetitemProc.

To provide a pointer to your dialog initialization function, you create a universal procedure pointer (UPP) of type PMPrintDialogInitUPP, using the function NewPMPrintDialogInitUPP. You can do so with code similar to the following:

PMPrintDialogInitUPP MyPrintDialogInitCallbackUPP;
MyPrintDialogInitCallbackUPP = NewPMPrintDialogInitUPP (&MyPrintDialogInitCallback);

After you are finished with your dialog initialization function, you can dispose of the UPP with the function DisposePMPrintDialogInitUPP. However, if you will use the same dialog initialization function for subsequent displays of the Print dialog, you can reuse the same UPP, rather than dispose of it and later create a new UPP.

Availability
Declared In
PMApplicationDeprecated.h

PMSheetDoneProcPtr

Defines a pointer to a sheet-done function. The function is called when the user dismisses a printing dialog presented as a sheet.

typedef void (*PMSheetDoneProcPtr) (
   PMPrintSession printSession,
   WindowRef documentWindow,
   Boolean accepted
);

You would declare your sheet-done function like this if you were to name it MyPrintSheetDoneCallback:

void MyPrintSheetDoneCallback (
   PMPrintSession printSession,
   WindowRef documentWindow,
   Boolean accepted
);

Parameters
printSession

The printing session object for the dialog.

documentWindow

The document window to which the sheet is attached.

accepted

A Boolean value indicating whether the user accepted (true) or canceled (false) the dialog.

Discussion

You pass a universal procedure pointer to your sheet-done callback function as a parameter to the functions PMSessionUseSheets, PMShowPrintDialogWithOptionsAsSheet, and PMShowPageSetupDialogAsSheet. Your sheet-done function is called when the user dismisses the dialog. If the user accepted the dialog, your function should take appropriate action depending on whether the Page Setup or Print dialog is being shown.

To provide a pointer to your sheet-done function, you create a universal procedure pointer (UPP) of type PMSheetDoneUPP, using the function NewPMSheetDoneUPP. You can do so with code similar to the following:

PMSheetDoneUPP gMyPrintSheetDoneUPP;
gMyPrintSheetDoneUPP = NewPMSheetDoneUPP (&MyPrintSheetDoneProc);

You should declare your universal procedure pointer as a global variable to allow for multiple windows, each with a dialog available at one time.

When your print job is completed, you should use the function DisposePMSheetDoneUPP function to dispose of the universal procedure pointer associated with your sheet-done function. However, if you plan to use the same sheet-done function in subsequent print jobs, you can reuse the same UPP, rather than dispose of it and later create a new UPP.

The sheet-done function does not have a parameter for application-supplied data. Instead, you can attach any data your application needs to the window as a property using the Window Manager function SetWindowProperty and retrieve the data using the function GetWindowProperty.

Availability
Declared In
PMApplication.h

Data Types

PMItemUPP

A type that defines a universal procedure pointer to an item proc callback.

typedef PMItemProcPtr PMItemUPP;

Discussion

This data type is used by functions that are deprecated. For more information, see the description of the PMItemProcPtr callback function.

Availability
Declared In
PMApplicationDeprecated.h

PMPageSetupDialogInitUPP

A type that defines a universal procedure pointer to a Page Setup dialog initialization callback.

typedef PMPageSetupDialogInitProcPtr PMPageSetupDialogInitUPP;

Discussion

This data type is used by functions that are deprecated. For more information, see the description of the PMPageSetupDialogInitProcPtr callback function.

Availability
Declared In
PMApplicationDeprecated.h

PMPrintDialogInitUPP

A type that defines a universal procedure pointer to a Print dialog initialization callback.

typedef PMPrintDialogInitProcPtr PMPrintDialogInitUPP;

Discussion

This data type is used by functions that are deprecated. For more information, see the description of the PMPrintDialogInitProcPtr callback function.

Availability
Declared In
PMApplicationDeprecated.h

PMSheetDoneUPP

A type that defines a universal procedure pointer to a sheet-done callback function.

typedef PMSheetDoneProcPtr PMSheetDoneUPP;

Discussion

For more information, see the description of the PMSheetDoneProcPtr callback function.

Availability
Declared In
PMApplication.h

Constants

Print Dialog Options

Flags that specify items to show in the expanded Print dialog in Mac OS X v10.5 and later.

typedef OptionBits PMPrintDialogOptionFlags;
enum {
   kPMHideInlineItems = (0L << 0),
   kPMShowDefaultInlineItems = (1L << 15),
   kPMShowInlineCopies = (1L << 0),
   kPMShowInlinePageRange = (1L << 1),
   kPMShowInlinePageRangeWithSelection = (1L << 6),
   kPMShowInlinePaperSize = (1L << 2),
   kPMShowInlineOrientation = (1L << 3),
   kPMShowInlineScale = (1L << 7),
   kPMShowPageAttributesPDE = (1L << 8),
};

Constants
kPMHideInlineItems

Show nothing in the inline portion of the Print dialog.

Available in Mac OS X v10.5 and later.

Not available to 64-bit applications.

Declared in PMApplication.h

kPMShowDefaultInlineItems

Show the default set of items (copies & page range) in the inline portion of the Print dialog.

Available in Mac OS X v10.5 and later.

Not available to 64-bit applications.

Declared in PMApplication.h

kPMShowInlineCopies

Show the copies edit-text field, the collated check box, and the two-sided check box (if the printer supports it) in the top portion of the Print dialog.

Available in Mac OS X v10.5 and later.

Not available to 64-bit applications.

Declared in PMApplication.h

kPMShowInlinePageRange

Show the page range radio buttons and the from & to page edit-text fields in the top portion of the Print dialog.

Available in Mac OS X v10.5 and later.

Not available to 64-bit applications.

Declared in PMApplication.h

kPMShowInlinePageRangeWithSelection

Show the page range radio buttons with the addition of a selection button and the From & To Page edit-text fields in the top portion of the Print dialog.

Available in Mac OS X v10.5 and later.

Not available to 64-bit applications.

Declared in PMApplication.h

kPMShowInlinePaperSize

Show the formatting paper size popup menu in the top portion of the Print dialog.

Available in Mac OS X v10.5 and later.

Not available to 64-bit applications.

Declared in PMApplication.h

kPMShowInlineOrientation

Show the page orientation buttons in the top portion of the Print dialog.

Available in Mac OS X v10.5 and later.

Not available to 64-bit applications.

Declared in PMApplication.h

kPMShowInlineScale

Show the scale edit-text field in the top portion of the Print dialog.

Available in Mac OS X v10.5 and later.

Not available to 64-bit applications.

Declared in PMApplication.h

kPMShowPageAttributesPDE

Add a separate pane to the Print dialog that contains the Page Setup dialog information (paper size, orientation, and scale).

Available in Mac OS X v10.5 and later.

Not available to 64-bit applications.

Declared in PMApplication.h

Declared In
PMApplication.h

Next Page > Hide TOC


Last updated: 2007-07-24




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice