---
title: UIGraphicsBeginPDFPage()
framework: uikit
role: symbol
role_heading: Function
path: uikit/uigraphicsbeginpdfpage()
---

# UIGraphicsBeginPDFPage()

Marks the beginning of a new page in a PDF context and configures it using default values.

## Declaration

```swift
func UIGraphicsBeginPDFPage()
```

## Discussion

Discussion This function ends any previous page before beginning a new one. It sets the media box of the new page to the rectangle you specified when you created the PDF context. If the current graphics context is not a PDF context, this function does nothing. You must call this function or the UIGraphicsBeginPDFPageWithInfo(_:_:) function before you issue any drawing commands.

## See Also

### PDF creation

- [UIGraphicsBeginPDFContextToData(_:_:_:)](uikit/uigraphicsbeginpdfcontexttodata(_:_:_:).md)
- [UIGraphicsBeginPDFContextToFile(_:_:_:)](uikit/uigraphicsbeginpdfcontexttofile(_:_:_:).md)
- [UIGraphicsEndPDFContext()](uikit/uigraphicsendpdfcontext().md)
- [UIGraphicsBeginPDFPageWithInfo(_:_:)](uikit/uigraphicsbeginpdfpagewithinfo(_:_:).md)
- [UIGraphicsGetPDFContextBounds()](uikit/uigraphicsgetpdfcontextbounds().md)
- [UIGraphicsAddPDFContextDestinationAtPoint(_:_:)](uikit/uigraphicsaddpdfcontextdestinationatpoint(_:_:).md)
- [UIGraphicsSetPDFContextDestinationForRect(_:_:)](uikit/uigraphicssetpdfcontextdestinationforrect(_:_:).md)
- [UIGraphicsSetPDFContextURLForRect(_:_:)](uikit/uigraphicssetpdfcontexturlforrect(_:_:).md)
