<!--
{
  "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/UIGraphicsBeginPDFPage()",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@F@UIGraphicsBeginPDFPage"
  },
  "title" : "UIGraphicsBeginPDFPage()"
}
-->

# UIGraphicsBeginPDFPage()

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

```
func UIGraphicsBeginPDFPage()
```

## Discussion

This function ends any previous page before beginning a new one. It sets the media box of the new page to the rectangle you specified when you created the PDF context.

If the current graphics context is not a PDF context, this function does nothing.

You must call this function or the [`UIGraphicsBeginPDFPageWithInfo(_:_:)`](/documentation/UIKit/UIGraphicsBeginPDFPageWithInfo(_:_:)) function before you issue any drawing commands.

---

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)