PMPrinterGetOutputResolution(_:_:_:)
Obtains the printer hardware output resolution for the specified print settings.
Declaration
func PMPrinterGetOutputResolution(_ printer: PMPrinter, _ printSettings: PMPrintSettings, _ resolutionP: UnsafeMutablePointer<PMResolution>) -> OSStatusParameters
- printer:
The printer whose output resolution you want to obtain.
- printSettings:
The print settings you want to use.
- resolutionP:
A pointer to your Pmresolution structure. On return, the structure contains the output resolution of the specified printer in pixels per inch.
Return Value
A result code. If the resolution cannot be reliably determined, this function returns an error.
Discussion
Some printers allow programmatic control of their hardware output resolution on a print job basis. The hardware resolution is determined by the combination of printer and print settings used for the print job. This function returns the best guess as to what printer resolution setting will be used for the destination print job.
Most applications do not need to use this function because they draw the same content regardless of the destination device. For those few applications that do adjust their drawing based on the output device, they should only do so when the print job destination is kPMDestinationPrinter or kPMDestinationFax. You can use the function PMSessionGetDestinationType to determine the destination for a print job.
This function should be used after displaying the Print dialog to the user so that it correctly reflects changes in print settings performed prior to printing.
See Also
Accessing Information About a Printer
PMPrinterCopyDescriptionURL(_:_:_:)PMPrinterCopyDeviceURI(_:_:)PMPrinterCopyHostName(_:_:)PMPrinterCopyPresets(_:_:)PMPrinterGetCommInfo(_:_:_:)PMPrinterGetDriverCreator(_:_:)PMPrinterGetID(_:)PMPrinterGetLocation(_:)PMPrinterGetMakeAndModelName(_:_:)PMPrinterGetMimeTypes(_:_:_:)PMPrinterGetName(_:)PMPrinterSetOutputResolution(_:_:_:)PMPrinterGetPaperList(_:_:)PMPrinterGetPrinterResolutionCount(_:_:)PMPrinterGetIndexedPrinterResolution(_:_:_:)PMPrinterGetState(_:_:)PMPrinterSetDefault(_:)PMPrinterIsDefault(_:)PMPrinterIsFavorite(_:)PMPrinterIsPostScriptCapable(_:)PMPrinterIsPostScriptPrinter(_:_:)PMPrinterIsRemote(_:_:)