---
title: "print(with:autoRotate:)"
framework: pdfkit
role: symbol
role_heading: Instance Method
path: "pdfkit/pdfview/print(with:autorotate:)"
---

# print(with:autoRotate:)

Prints the document with the specified printer information.

## Declaration

```swift
func print(with printInfo: NSPrintInfo, autoRotate doRotate: Bool)
```

## Discussion

Discussion If autoRotate is set to true, then ths method ignores the orientation attribute in the NSPrintInfo object and instead chooses the orientation that best fits the page to the paper size. This orientation occurs on a page-by-page basis.

## See Also

### Rendering the View and Printing

- [draw(_:)](pdfkit/pdfview/draw(_:).md)
- [drawPagePost(_:)](pdfkit/pdfview/drawpagepost(_:).md)
- [print(with:autoRotate:pageScaling:)](pdfkit/pdfview/print(with:autorotate:pagescaling:).md)
