PMGetLastPage(_:_:)
Obtains the number of the last page to be printed.
Declaration
func PMGetLastPage(_ printSettings: PMPrintSettings, _ last: UnsafeMutablePointer<UInt32>) -> OSStatusParameters
- printSettings:
The print settings object whose last page number you want to obtain.
- last:
A pointer to your
UInt32variable. On return, the variable contains the page number of the last page to print.
Return Value
A result code. See Result Codes.
Discussion
You use this function to obtain the page number entered by the user in the To field of the Print dialog. If the user did not enter a value, the function returns the value of the previous call to PMSetLastPage, if any, or a default value.
You should not look for the constant kPMPrintAllPages. That constant is used only with the PMSetLastPage and PMSetPageRange functions to specify a last page. It is not returned by the PMGetLastPage function.
See Also
Accessing Data in Print Settings Objects
PMGetFirstPage(_:_:)PMSetFirstPage(_:_:_:)PMSetLastPage(_:_:_:)PMGetPageRange(_:_:_:)PMSetPageRange(_:_:_:)PMPrintSettingsGetJobName(_:_:)PMPrintSettingsSetJobName(_:_:)PMGetCopies(_:_:)PMSetCopies(_:_:_:)PMGetCollate(_:_:)PMSetCollate(_:_:)PMGetDuplex(_:_:)PMSetDuplex(_:_:)PMPrintSettingsGetValue(_:_:_:)PMPrintSettingsSetValue(_:_:_:_:)PMPrintSettingsCopyAsDictionary(_:_:)PMPrintSettingsCopyKeys(_:_:)