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

# NSPrintPanel

The Print panel that queries the user for information about a print job.

```
@MainActor class NSPrintPanel
```

## Overview

A Print panel may let the user select the range of pages to print and the number of copies before executing the Print command. Print panels can display a simplified interface when printing certain types of data. For example, the panel can display a list of print-setting presets, which lets the user enable print settings in groups as opposed to individually. Assigning an appropriate string to the [`jobStyleHint`](/documentation/AppKit/NSPrintPanel/jobStyleHint-swift.property) property activates the simplified interface and identifies which presets to display.

For design guidance, see [Human Interface Guidelines](https://developer.apple.com/design/human-interface-guidelines/macos/system-capabilities/printing/).

## Topics

### Creating the Printing Panel

[`+  printPanel`](/documentation/AppKit/NSPrintPanel/printPanel)

Returns a new print panel object.

### Customizing the Panel

[`jobStyleHint`](/documentation/AppKit/NSPrintPanel/jobStyleHint-swift.property)

The type of settings that the print panel displays.

[`JobStyleHint`](/documentation/AppKit/NSPrintPanel/JobStyleHint-swift.struct)

Constants that specify job style hints for activating the simplified Print panel interface and setting the options to display.

[`options`](/documentation/AppKit/NSPrintPanel/options-swift.property)

The current configuration options for the Print panel.

[`Options`](/documentation/AppKit/NSPrintPanel/Options-swift.struct)

Constants that specify options for configuring the contents of the main Print panel.

[`-  defaultButtonTitle`](/documentation/AppKit/NSPrintPanel/defaultButtonTitle())

Returns the title of the Print panel’s default button.

[`-  setDefaultButtonTitle:`](/documentation/AppKit/NSPrintPanel/setDefaultButtonTitle(_:))

Sets the title of the Print panel’s default button.

[`helpAnchor`](/documentation/AppKit/NSPrintPanel/helpAnchor)

The HTML help anchor associated with the Print panel.

### Managing Accessory Views

[`-  addAccessoryController:`](/documentation/AppKit/NSPrintPanel/addAccessoryController(_:))

Adds a custom controller to the Print panel to manage an accessory view.

[`-  removeAccessoryController:`](/documentation/AppKit/NSPrintPanel/removeAccessoryController(_:))

Removes the specified controller and accessory view from the Print panel.

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

A set of methods that a Print panel object can use to get information from a printing accessory controller.

[`accessoryControllers`](/documentation/AppKit/NSPrintPanel/accessoryControllers)

The array of controller objects that manage the Print panel’s accessory views.

### Running the Panel

[`-  beginSheetUsingPrintInfo:onWindow:completionHandler:`](/documentation/AppKit/NSPrintPanel/beginSheet(using:on:completionHandler:))

[`-  beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextInfo:`](/documentation/AppKit/NSPrintPanel/beginSheet(with:modalFor:delegate:didEnd:contextInfo:))

Displays a Print panel sheet and runs it modally for the specified window.

[`-  runModal`](/documentation/AppKit/NSPrintPanel/runModal())

Displays the Print panel and begins the modal loop.

[`-  runModalWithPrintInfo:`](/documentation/AppKit/NSPrintPanel/runModal(with:))

Displays the Print panel and runs the modal loop using the specified printing information.

### Accessing the Printing Information

[`printInfo`](/documentation/AppKit/NSPrintPanel/printInfo)

The information associated with the running Print panel.

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

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

[`Result`](/documentation/AppKit/NSPrintPanel/Result)

### Deprecated

[`-  accessoryView`](/documentation/AppKit/NSPrintPanel/accessoryView)

Returns the accessory view of the Print panel.

[`-  setAccessoryView:`](/documentation/AppKit/NSPrintPanel/setAccessoryView:)

Sets the accessory view for the Print panel.

[`-  updateFromPrintInfo`](/documentation/AppKit/NSPrintPanel/updateFromPrintInfo)

Updates the Print panel with information from the current print operation object.

[`-  finalWritePrintInfo`](/documentation/AppKit/NSPrintPanel/finalWritePrintInfo)

Writes the Print panel’s printing attributes to the current print operation object.

## Relationships

### Conforms To

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

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

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

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

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

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

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

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)