<!--
{
  "availability" : [
    "macOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WKWebView/printOperation(with:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WKWebView(im)printOperationWithPrintInfo:"
  },
  "title" : "printOperation(with:)"
}
-->

# printOperation(with:)

Returns the print operation object to use when printing the contents of the web view.

```
func printOperation(with printInfo: NSPrintInfo) -> NSPrintOperation
```

## Parameters

`printInfo`

The printer information object to use when configuring the print operation.

## Return Value

The print operation object to use when printing the web view, or `nil` if printing is not supported.

## Discussion

---

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)