<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIGraphicsPDFRendererContext/beginPage(withBounds:pageInfo:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIGraphicsPDFRendererContext(im)beginPageWithBounds:pageInfo:"
  },
  "title" : "beginPage(withBounds:pageInfo:)"
}
-->

# beginPage(withBounds:pageInfo:)

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

```
func beginPage(withBounds bounds: CGRect, pageInfo: [String : Any])
```

## Parameters

`bounds`

A rectangle that specifies the size and location of the new PDF page. This rectangle corresponds to the media box in PDF terminology.

`pageInfo`

A dictionary that specifies additional page-related information, such as the boxes that define different parts of the page. For a list of keys you can include in this dictionary, see `Box Keys` in <doc://com.apple.documentation/documentation/CoreGraphics/auxiliary-dictionary-keys>.

## Discussion

This function ends any previous page before beginning a new one. It sets the media box of the new page to the value in the <doc://com.apple.documentation/documentation/CoreGraphics/kCGPDFContextMediaBox> key of the `pageInfo` dictionary, or to the value in the bounds parameter if the dictionary does not contain the key.

---

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)