<!--
{
  "availability" : [
    "macOS: 10.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PDFKit",
  "identifier" : "/documentation/PDFKit/PDFView/print(with:autoRotate:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "PDFKit"
    ],
    "preciseIdentifier" : "c:objc(cs)PDFView(im)printWithInfo:autoRotate:"
  },
  "title" : "print(with:autoRotate:)"
}
-->

# print(with:autoRotate:)

Prints the document with the specified printer information.

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

## Discussion

If `autoRotate` is set to <doc://com.apple.documentation/documentation/Swift/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.

---

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)