<!--
{
  "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",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIGraphicsPDFRendererContext"
  },
  "title" : "UIGraphicsPDFRendererContext"
}
-->

# UIGraphicsPDFRendererContext

The drawing environment for a PDF renderer.

```
class UIGraphicsPDFRendererContext
```

## Overview

When using the [`UIGraphicsPDFRenderer`](/documentation/UIKit/UIGraphicsPDFRenderer) drawing methods, you must pass a block of type [`UIGraphicsPDFRenderer.DrawingActions`](/documentation/UIKit/UIGraphicsPDFRenderer/DrawingActions) as an argument, which provides a [`UIGraphicsPDFRendererContext`](/documentation/UIKit/UIGraphicsPDFRendererContext) instance as an argument. Use the context object to access high-level drawing functions and the underlying Core Graphics context.

> Note:
> ``doc://com.apple.uikit/documentation/UIKit/UIGraphicsPDFRendererContext`` inherits much of its functionality from its abstract superclass ``doc://com.apple.uikit/documentation/UIKit/UIGraphicsRendererContext``.

To learn how to use a [`UIGraphicsPDFRendererContext`](/documentation/UIKit/UIGraphicsPDFRendererContext) object in combination with a PDF renderer, see [`Creating a graphics PDF renderer`](/documentation/UIKit/UIGraphicsPDFRenderer#Creating-a-graphics-PDF-renderer).

## Topics

### Marking new pages

[`beginPage()`](/documentation/UIKit/UIGraphicsPDFRendererContext/beginPage())

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

[`beginPage(withBounds:pageInfo:)`](/documentation/UIKit/UIGraphicsPDFRendererContext/beginPage(withBounds:pageInfo:))

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

### Getting the PDF bounds

[`pdfContextBounds`](/documentation/UIKit/UIGraphicsPDFRendererContext/pdfContextBounds)

The bounds of the PDF context for the current page.

### Managing destinations

[`addDestination(withName:at:)`](/documentation/UIKit/UIGraphicsPDFRendererContext/addDestination(withName:at:))

Creates a named destination point in the current PDF page.

[`setDestinationWithName(_:for:)`](/documentation/UIKit/UIGraphicsPDFRendererContext/setDestinationWithName(_:for:))

Creates a link rectangle in the current page that jumps the PDF viewer to the named destination when clicked.

[`setURL(_:for:)`](/documentation/UIKit/UIGraphicsPDFRendererContext/setURL(_:for:))

Creates a link to an external resource defined by a URL



---

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)