<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSPrintInfo/AttributeKey",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@T@NSPrintInfoAttributeKey"
  },
  "title" : "NSPrintInfo.AttributeKey"
}
-->

# NSPrintInfo.AttributeKey

Constants that specify print job attributes.

```
struct AttributeKey
```

## Topics

### Page Setup Attributes

[`static let paperName: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/paperName)

An `NSString` object containing the paper name.

[`static let paperSize: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/paperSize)

An `NSSize` value specifying the height and width of paper in points.

[`static let orientation: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/orientation)

An `NSNumber` object containing an `NSPrintingOrientation`.

[`static let scalingFactor: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/scalingFactor)

Scale factor percentage before pagination.

### Pagination Attributes

[`static let leftMargin: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/leftMargin)

`NSNumber`, containing a floating-point value that specifies the left margin, in points.

[`static let rightMargin: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/rightMargin)

`NSNumber`, containing a floating-point value that specifies the right margin, in points.

[`static let topMargin: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/topMargin)

`NSNumber`, containing a floating-point value that specifies the top margin, in points.

[`static let bottomMargin: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/bottomMargin)

`NSNumber`, containing a floating-point value that specifies the bottom margin, in points.

[`static let horizontallyCentered: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/horizontallyCentered)

An `NSNumber` object containing a Boolean value that specifies whether to horizontally center pages.

[`static let verticallyCentered: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/verticallyCentered)

An `NSNumber` object containing a Boolean value that specifies whether to vertically center pages.

[`static let horizontalPagination: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/horizontalPagination)

`NSNumber`, containing a `NSPrintingPaginationMode` value.

[`static let verticalPagination: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/verticalPagination)

`NSNumber`, containing a `NSPrintingPaginationMode` value.

### Other Attributes

[`static let allPages: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/allPages)

An `NSNumber` object containing a Boolean value that specifies whether to include all pages.

[`static let copies: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/copies)

An `NSNumber` object containing an integer—the number of copies to spool.

[`static let detailedErrorReporting: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/detailedErrorReporting)

An `NSNumber` object containing a Boolean value that specifies whether to produce detailed error reports.

[`static let faxNumber: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/faxNumber)

An `NSString` object that specifies a fax number.

[`static let firstPage: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/firstPage)

An `NSNumber` object containing an integer value that specifies the first page in the print job.

[`static let headerAndFooter: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/headerAndFooter)

An `NSNumber` object containing a Boolean value that specifies whether to include a header and footer.

[`static let jobDisposition: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/jobDisposition)

An `NSString` object that specifies the job disposition.

[`static let jobSavingFileNameExtensionHidden: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/jobSavingFileNameExtensionHidden)

An `NSNumber` object containing a Boolean value that specifies whether to hide the job’s file name extension.

[`static let jobSavingURL: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/jobSavingURL)

An `NSURL` containing the location to which the job file will be saved when the [`jobDisposition`](/documentation/AppKit/NSPrintInfo/jobDisposition-swift.property) is [`save`](/documentation/AppKit/NSPrintInfo/JobDisposition-swift.struct/save).

[`static let lastPage: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/lastPage)

An `NSNumber` object containing an integer value that specifies the last page in the print job.

[`static let mustCollate: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/mustCollate)

An `NSNumber` object containing a Boolean value that specifies whether to collate output.

[`static let pagesAcross: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/pagesAcross)

An `NSNumber` object that specifies the number of logical pages to be tiled horizontally on a physical sheet of paper.

[`static let pagesDown: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/pagesDown)

An `NSNumber` object that specifies the number of logical pages to be tiled vertically on a physical sheet of paper.

[`static let printer: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/printer)

An `NSPrinter` object—the printer to use.

[`static let printerName: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/printerName)

An `NSString` object that specifies the name of a printer.

[`static let reversePageOrder: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/reversePageOrder)

An `NSNumber` object containing a Boolean value that specifies whether to print pages in reverse order.

[`static let selectionOnly: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/selectionOnly)

An `NSNumber` object containing a Boolean value that specifies whether to print the current selection.

[`static let time: NSPrintInfo.AttributeKey`](/documentation/AppKit/NSPrintInfo/AttributeKey/time)

An `NSDate` object that specifies the time at which printing should begin.

### Initializers

[`init(String)`](/documentation/AppKit/NSPrintInfo/AttributeKey/init(_:))

Creates a print job attribute key.

[`init(rawValue: String)`](/documentation/AppKit/NSPrintInfo/AttributeKey/init(rawValue:))

Creates a new instance with the specified raw value.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

---

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)