---
title: UIGraphicsGetPDFContextBounds()
framework: uikit
role: symbol
role_heading: Function
path: uikit/uigraphicsgetpdfcontextbounds()
---

# UIGraphicsGetPDFContextBounds()

Returns the current page bounds.

## Declaration

```swift
func UIGraphicsGetPDFContextBounds() -> CGRect
```

## Return Value

Return Value The current page bounds associated with the PDF context or CGRectZero if the current context is not a PDF context.

## Discussion

Discussion If a page has not yet been started, this function returns the default media box you specified when you created the PDF context; otherwise, it returns the page bounds for the current page.

## See Also

### PDF creation

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