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

# NSPDFPanel

A Save or Export as PDF panel that’s consistent with the macOS user interface.

```
@MainActor class NSPDFPanel
```

## Overview

A PDF panel has a variety of built-in customization controls, such as page orientation, paper size, and tags. It also supports the use of a custom accessory view controller that allows an app to specify how a PDF file should be created.

## Topics

### Creating a PDF Panel

[`+  panel`](/documentation/AppKit/NSPDFPanel/panel)

Returns a new `NSPDFPanel` object.

### Managing the Contents of a PDF Panel

[`accessoryController`](/documentation/AppKit/NSPDFPanel/accessoryController)

A view controller for the accessory view that the panel can present.

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

A set of configuration options that determine the accessory views the PDF panel should display.

[`defaultFileName`](/documentation/AppKit/NSPDFPanel/defaultFileName)

The initial value for the user-editable filename shown in the name field of the PDF panel.

### Displaying a PDF Panel

[`-  beginSheetWithPDFInfo:modalForWindow:completionHandler:`](/documentation/AppKit/NSPDFPanel/beginSheet(with:modalFor:completionHandler:))

Presents a document-modal PDF panel.

### Constants

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

Constants used to configure the contents of a PDF panel.

## Relationships

### Conforms To

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

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

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

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

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

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

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

### 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)