---
title: "pdf(region:allowTransparentBackground:)"
framework: webkit
role: symbol
role_heading: Type Method
path: "webkit/webpage/exportedcontentconfiguration/pdf(region:allowtransparentbackground:)"
---

# pdf(region:allowTransparentBackground:)

A configuration of a webpage for a representation as PDF data.

## Declaration

```swift
static func pdf(region: WebPage.ExportedContentConfiguration.Region = .contents, allowTransparentBackground: Bool = false) -> WebPage.ExportedContentConfiguration
```

## Parameters

- `region`: The region of the page used to generate the PDF.
- `allowTransparentBackground`: Indicates whether the PDF may have a transparent background.

## Return Value

Return Value The PDF configuration of this page that will be used when producing its representation.

## See Also

### Configurable types

- [WebPage.ExportedContentConfiguration.Region](webkit/webpage/exportedcontentconfiguration/region.md)
- [image(region:allowTransparentBackground:snapshotWidth:afterScreenUpdates:)](webkit/webpage/exportedcontentconfiguration/image(region:allowtransparentbackground:snapshotwidth:afterscreenupdates:).md)
