---
title: "printOperation(with:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/wkwebview/printoperation(with:)"
---

# printOperation(with:)

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

## Declaration

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

## Parameters

- `printInfo`: The printer information object to use when configuring the print operation.

## Return Value

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

## See Also

### Capturing the web view’s content

- [takeSnapshot(with:completionHandler:)](webkit/wkwebview/takesnapshot(with:completionhandler:).md)
- [createPDF(configuration:completionHandler:)](webkit/wkwebview/createpdf(configuration:completionhandler:).md)
- [pdf(configuration:)](webkit/wkwebview/pdf(configuration:).md)
- [createWebArchiveData(completionHandler:)](webkit/wkwebview/createwebarchivedata(completionhandler:).md)
- [WKSnapshotConfiguration](webkit/wksnapshotconfiguration.md)
- [WKPDFConfiguration](webkit/wkpdfconfiguration.md)
