<!--
{
  "availability" : [
    "iOS: 4.2.0 -",
    "iPadOS: 4.2.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIPrintFormatter/rectForPage(at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIPrintFormatter(im)rectForPageAtIndex:"
  },
  "title" : "rectForPage(at:)"
}
-->

# rectForPage(at:)

Returns the area that encloses a specified page of content.

```
func rectForPage(at pageIndex: Int) -> CGRect
```

## Parameters

`pageIndex`

The index number of a page.

## Return Value

A rectangle enclosing the content area for page `pageIndex`.

## Discussion

Returns <doc://com.apple.documentation/documentation/CoreGraphics/CGRectZero> if the print formatter draws no content on the specified 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)