Carbon


PMSetLastPage

Header: PMCore.h Carbon status: Supported

Sets the default page number of the last page to be printed, as displayed in the Print dialog box.

OSStatus PMSetLastPage (
    PMPrintSettings printSettings, 
    UInt32 last, 
    Boolean lock
);
Parameter descriptions
printSettings

A PMPrintSettings object.

last

The page number of the last page to print. This value appears in the To field of the Print dialog box. Pass the constant kPMPrintAllPages to print the entire document. This causes the All button to be selected, and clears the From and To fields of the Print dialog box.

lock

Pass true to prevent the user from changing the last page value. Locking is supported only on Mac OS X.

function result

A result code. A result code. See “Result Codes”. The result code kPMLockIgnored indicates that the printer driver does not support locking of the last value.

DISCUSSION

On Mac OS 8 and 9, the default and maximum last page number is 9999. On Mac OS X, the default and maximum last page number is MAX_INT(UInt32).

SPECIAL CONSIDERATIONS

Valid within a printing session after creating a print settings object.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later.

CARBON NOTES

The PMSetLastPagefunction replaces the Printing Manager opcode kPrinterDirectOpCode in kPDVerifySelect mode, and sets information previously stored in the iLstPage field of the Printing Manager structure TPrJob.


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