---
title: "printView(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsview/printview(_:)"
---

# printView(_:)

This action method opens the Print panel, and if the user chooses an option other than canceling, prints the view and all its subviews to the device specified in the Print panel.

## Declaration

```swift
func printView(_ sender: Any?)
```

## Parameters

- `sender`: The object that sent the message.

## See Also

### Printing the View’s Content

- [beginPage(in:atPlacement:)](appkit/nsview/beginpage(in:atplacement:).md)
- [dataWithEPS(inside:)](appkit/nsview/datawitheps(inside:).md)
- [dataWithPDF(inside:)](appkit/nsview/datawithpdf(inside:).md)
- [printJobTitle](appkit/nsview/printjobtitle.md)
- [pageHeader](appkit/nsview/pageheader.md)
- [pageFooter](appkit/nsview/pagefooter.md)
- [writeEPS(inside:to:)](appkit/nsview/writeeps(inside:to:).md)
- [writePDF(inside:to:)](appkit/nsview/writepdf(inside:to:).md)
- [drawPageBorder(with:)](appkit/nsview/drawpageborder(with:).md)
- [drawSheetBorder(with:)](appkit/nsview/drawsheetborder(with:).md)
