<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PDFKit",
  "identifier" : "/documentation/PDFKit/PDFPage/bounds(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "PDFKit"
    ],
    "preciseIdentifier" : "c:objc(cs)PDFPage(im)boundsForBox:"
  },
  "title" : "bounds(for:)"
}
-->

# bounds(for:)

Returns the bounds for the specified PDF display box.

```
func bounds(for box: PDFDisplayBox) -> CGRect
```

## Discussion

The [`PDFDisplayBox`](/documentation/PDFKit/PDFDisplayBox) enumeration defines the various box types.

Note that only the media box is required for a PDF. If you request the bounds for the crop box, but the PDF does not include a crop box, the bounds for the media box are returned instead. If you request the bounds for other box types, and the PDF does not includes these types, the bounds for the crop box are returned instead.

The coordinates for the box are in page space, so you might need to transform the points if the page has a rotation on it. Also, note that the bounds `boundsForBox` returns are intersected with the page’s media box.

`boundsForBox` throws a range exception if `box` is not in range.

## See Also

[`PDFPage`](/documentation/PDFKit/PDFPage)

`PDFPage`, a subclass of `NSObject`, defines methods used to render PDF pages and work with annotations, text, and selections.



---

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)