NSPrintInfo
An object that stores information that’s used to generate printed output.
Declaration
class NSPrintInfoOverview
A shared NSPrintInfo object is automatically created for an app and is used by default for all printing jobs for that app. The printing information in an NSPrintInfo object is stored in a dictionary. To access the standard attributes in the dictionary directly, this class defines a set of keys and provides the dictionary() method. You can also initialize an instance of this class using the init(dictionary:) method.
You can use this dictionary to store custom information associated with a print job. Any non-object values should be stored as NSNumber or NSValue objects in the dictionary. See NSNumber for a list of types which should be stored as numbers. For other non-object values, use the NSValue class.
To store custom information that belongs in printing presets you should use the dictionary returned by the printSettings method.
Topics
Creating the Printing Information Object
Managing the Printing Rectangle
paperSizetopMarginbottomMarginleftMarginrightMarginimageablePageBoundsorientationNSPrintInfo.PaperOrientationpaperNameNSPrinter.PaperNamelocalizedPaperName
Pagination
Positioning the Image on the Page
Specifying the Printer
Controlling Printing
Accessing the Print Info Dictionary
Print Settings Convenience Methods
Accessing Core Printing Information
printSettingsNSPrintInfo.SettingKeypmPrintSession()pmPageFormat()pmPrintSettings()updateFromPMPageFormat()updateFromPMPrintSettings()takeSettings(from:)