<!--
{
  "availability" : [
    "iOS: 3.2.0 -",
    "iPadOS: 3.2.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIGraphicsGetPDFContextBounds()",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@F@UIGraphicsGetPDFContextBounds"
  },
  "title" : "UIGraphicsGetPDFContextBounds()"
}
-->

# UIGraphicsGetPDFContextBounds()

Returns the current page bounds.

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

## Return Value

The current page bounds associated with the PDF context or <doc://com.apple.documentation/documentation/CoreGraphics/CGRectZero> if the current context is not a PDF context.

## 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)