Instance Property


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


var pdfPrintOperation: NSPrintOperation { get }


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.

See Also

Printing Documents

var printInfo: NSPrintInfo

The printing information associated with the document.

func preparePageLayout(NSPageLayout) -> Bool

Invoked by runModalPageLayoutWithPrintInfo: and runModalPageLayout(with:delegate:didRun:contextInfo:) to do any customization of the Page Layout panel pageLayout, such as adding an accessory view.

func runModalPageLayout(with: NSPrintInfo, delegate: Any?, didRun: Selector?, contextInfo: UnsafeMutableRawPointer?)

Runs the modal page layout panel with the receiver’s printing information object

func shouldChangePrintInfo(NSPrintInfo) -> Bool

Returns a Boolean value indicating whether the receiver should allow changes to the default NSPrintInfo object used in printing the document.

func saveToPDF(Any?)

Exports a PDF representation of the document’s current contents.