<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSPrintInfo",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSPrintInfo"
  },
  "title" : "NSPrintInfo"
}
-->

# NSPrintInfo

An object that stores information that’s used to generate printed output.

```
class NSPrintInfo
```

## Overview

A shared [`NSPrintInfo`](/documentation/AppKit/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`](/documentation/AppKit/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()`](/documentation/AppKit/NSPrintInfo/dictionary()) method. You can also initialize an instance of this class using the [`init(dictionary:)`](/documentation/AppKit/NSPrintInfo/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 <doc://com.apple.documentation/documentation/Foundation/NSNumber> or <doc://com.apple.documentation/documentation/Foundation/NSValue> objects in the dictionary. See <doc://com.apple.documentation/documentation/Foundation/NSNumber> for a list of types which should be stored as numbers. For other non-object values, use the <doc://com.apple.documentation/documentation/Foundation/NSValue> class.

To store custom information that belongs in printing presets you should use the dictionary returned by the [`printSettings`](/documentation/AppKit/NSPrintInfo/printSettings) method.

## Topics

### Creating the Printing Information Object

[`shared`](/documentation/AppKit/NSPrintInfo/shared)

The shared printing information object.

[`init(dictionary:)`](/documentation/AppKit/NSPrintInfo/init(dictionary:))

Returns a printing information object initialized with the parameters in the specified dictionary.

[`init()`](/documentation/AppKit/NSPrintInfo/init())

Creates a printing information object.

[`init(coder:)`](/documentation/AppKit/NSPrintInfo/init(coder:))

Creates a printing information object from data in an unarchiver.

### Managing the Printing Rectangle

[`paperSize`](/documentation/AppKit/NSPrintInfo/paperSize)

The size of the paper.

[`topMargin`](/documentation/AppKit/NSPrintInfo/topMargin)

The top margin to the specified size.

[`bottomMargin`](/documentation/AppKit/NSPrintInfo/bottomMargin)

The height of the bottom margin.

[`leftMargin`](/documentation/AppKit/NSPrintInfo/leftMargin)

The width of the left margin.

[`rightMargin`](/documentation/AppKit/NSPrintInfo/rightMargin)

The width of the right margin.

[`imageablePageBounds`](/documentation/AppKit/NSPrintInfo/imageablePageBounds)

The imageable area of a sheet of paper specified by the print info.

[`orientation`](/documentation/AppKit/NSPrintInfo/orientation-swift.property)

The orientation attribute.

[`NSPrintInfo.PaperOrientation`](/documentation/AppKit/NSPrintInfo/PaperOrientation)

Constants that describe the orientation of printing on a page.

[`paperName`](/documentation/AppKit/NSPrintInfo/paperName)

The name of the currently selected paper size.

[`NSPrinter.PaperName`](/documentation/AppKit/NSPrinter/PaperName)

The type you use to specify the name of a type of paper.

[`localizedPaperName`](/documentation/AppKit/NSPrintInfo/localizedPaperName)

The human-readable name of the currently selected paper size, suitable for presentation in user interfaces.

### Pagination

[`horizontalPagination`](/documentation/AppKit/NSPrintInfo/horizontalPagination)

The horizontal pagination mode.

[`verticalPagination`](/documentation/AppKit/NSPrintInfo/verticalPagination)

The vertical pagination to the specified mode.

[`NSPrintInfo.PaginationMode`](/documentation/AppKit/NSPrintInfo/PaginationMode)

Constants that specify the different ways in which an image is divided into pages.

### Positioning the Image on the Page

[`isHorizontallyCentered`](/documentation/AppKit/NSPrintInfo/isHorizontallyCentered)

A Boolean value that indicates whether the image is centered horizontally.

[`isVerticallyCentered`](/documentation/AppKit/NSPrintInfo/isVerticallyCentered)

A Boolean value that indicates whether the image is centered vertically.

### Specifying the Printer

[`printer`](/documentation/AppKit/NSPrintInfo/printer)

The printer object to be used for printing.

[`NSPrinter`](/documentation/AppKit/NSPrinter)

An object that describes a printer’s capabilities.

### Controlling Printing

[`jobDisposition`](/documentation/AppKit/NSPrintInfo/jobDisposition-swift.property)

The action specified for the job.

[`NSPrintInfo.JobDisposition`](/documentation/AppKit/NSPrintInfo/JobDisposition-swift.struct)

Constants that specify values for the print job disposition.

[`setUpPrintOperationDefaultValues()`](/documentation/AppKit/NSPrintInfo/setUpPrintOperationDefaultValues())

Validates the attributes encapsulated by the print info.

### Accessing the Print Info Dictionary

[`dictionary()`](/documentation/AppKit/NSPrintInfo/dictionary())

Returns the print info’s dictionary that contains the printing attributes.

### Print Settings Convenience Methods

[`isSelectionOnly`](/documentation/AppKit/NSPrintInfo/isSelectionOnly)

A Boolean value that indicates whether only the currently selected contents should be printed.

[`scalingFactor`](/documentation/AppKit/NSPrintInfo/scalingFactor)

The current scaling factor.

### Accessing Core Printing Information

[`printSettings`](/documentation/AppKit/NSPrintInfo/printSettings)

A mutable dictionary containing the print settings from Core Printing.

[`NSPrintInfo.SettingKey`](/documentation/AppKit/NSPrintInfo/SettingKey)

The type you use to specify a print info setting key.

[`pmPrintSession()`](/documentation/AppKit/NSPrintInfo/pmPrintSession())

Returns a Core Printing object configured with the print info’s session information.

[`pmPageFormat()`](/documentation/AppKit/NSPrintInfo/pmPageFormat())

Returns a Core Printing object configured with the print info’s page format information.

[`pmPrintSettings()`](/documentation/AppKit/NSPrintInfo/pmPrintSettings())

Returns a Core Printing object configured with the print info’s print settings information

[`updateFromPMPageFormat()`](/documentation/AppKit/NSPrintInfo/updateFromPMPageFormat())

Synchronizes the print info’s page format information with information from its associated page format object.

[`updateFromPMPrintSettings()`](/documentation/AppKit/NSPrintInfo/updateFromPMPrintSettings())

Synchronizes the print info’s print settings information with information from its associated print settings object.

[`takeSettings(from:)`](/documentation/AppKit/NSPrintInfo/takeSettings(from:))

Updates the print info with all the settings and attributes in the specified PDF info object.

### Constants

[`NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey)

Constants that specify print job attributes.

### Deprecated

[`defaultPrinter`](/documentation/AppKit/NSPrintInfo/defaultPrinter)

Deprecated.

[`setDefaultPrinter:`](/documentation/AppKit/NSPrintInfo/setDefaultPrinter:)

Deprecated.

[`sizeForPaperName:`](/documentation/AppKit/NSPrintInfo/sizeForPaperName:)

Deprecated.

[`NSPrintInfo.Orientation`](/documentation/AppKit/NSPrintInfo/Orientation-swift.enum)

Constants that specify page orientations.

[Deprecated Printing Keys](/documentation/AppKit/deprecated-printing-keys)

These keys refer to older printing properties that are no longer used.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)