---
title: pdfPrintOperation
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsdocument/pdfprintoperation
---

# pdfPrintOperation

A print operation you can use to create a PDF representation of the document’s current contents.

## Declaration

```swift
var pdfPrintOperation: NSPrintOperation { get }
```

## Discussion

Discussion The object in this property can be run to print the document’s current contents to a PDF file. The default print operation stored by this property is obtained by calling the printOperation(withSettings:) method and  passing a print settings object that contains only the disposition (save) and a NULL error object reference. If your document subclass supports creating PDF representations, you can override this property as needed to customize the options. important: This property does not copy the document’s printInfo to the PDF printing operation object. Your app should maintain a separate NSPrintInfo instance specifically for creating PDFs and assign it to the printInfo property of the operation object.

## See Also

### Printing the Document

- [printInfo](appkit/nsdocument/printinfo.md)
- [preparePageLayout(_:)](appkit/nsdocument/preparepagelayout(_:).md)
- [runModalPageLayout(with:delegate:didRun:contextInfo:)](appkit/nsdocument/runmodalpagelayout(with:delegate:didrun:contextinfo:).md)
- [runModalPrintOperation(_:delegate:didRun:contextInfo:)](appkit/nsdocument/runmodalprintoperation(_:delegate:didrun:contextinfo:).md)
- [shouldChangePrintInfo(_:)](appkit/nsdocument/shouldchangeprintinfo(_:).md)
- [print(withSettings:showPrintPanel:delegate:didPrint:contextInfo:)](appkit/nsdocument/print(withsettings:showprintpanel:delegate:didprint:contextinfo:).md)
- [printOperation(withSettings:)](appkit/nsdocument/printoperation(withsettings:).md)
- [saveToPDF(_:)](appkit/nsdocument/savetopdf(_:).md)
