---
title: WKPDFConfiguration
framework: webkit
role: symbol
role_heading: Class
path: webkit/wkpdfconfiguration
---

# WKPDFConfiguration

The configuration data to use when generating a PDF representation of a web view’s contents.

## Declaration

```swift
@MainActor class WKPDFConfiguration
```

## Overview

Overview Create a WKPDFConfiguration object when you want to generate a PDF version of your web view’s content. Use this object to specify the portion of the web view to capture. To generate the PDF content, pass the configuration object to the createPDF(configuration:completionHandler:) method of WKWebView, which returns the PDF data for you to use.

## Topics

### Specifying the snapshot dimensions

- [rect](webkit/wkpdfconfiguration/rect-2a0vp.md)

### Specifying snapshot properties

- [allowTransparentBackground](webkit/wkpdfconfiguration/allowtransparentbackground.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)

## See Also

### Snapshots

- [WKSnapshotConfiguration](webkit/wksnapshotconfiguration.md)
