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

# drawPrintFormatter(_:forPageAt:)

Performs custom drawing in addition to the specified print formatter’s drawing for a page.

```
func drawPrintFormatter(_ printFormatter: UIPrintFormatter, forPageAt pageIndex: Int)
```

## Parameters

`printFormatter`

A [`UIPrintFormatter`](/documentation/UIKit/UIPrintFormatter) object associated with the page at `pageIndex`.

`pageIndex`

The index of the page for `printFormatter` to draw on.

## Discussion

The system invokes this method for each print formatter associated with the specified page. The default implementation invokes the [`draw(in:forPageAt:)`](/documentation/UIKit/UIPrintFormatter/draw(in:forPageAt:)) method of each [`UIPrintFormatter`](/documentation/UIKit/UIPrintFormatter) object.

Override this method to intermix custom drawing with the formatter drawing — for example, by adding an overlay or underlay graphic. Call [`draw(in:forPageAt:)`](/documentation/UIKit/UIPrintFormatter/draw(in:forPageAt:)) to have the print formatter draw its portion of the page.

The system configures this method for drawing to the current graphics context according to [`UIGraphicsGetCurrentContext()`](/documentation/UIKit/UIGraphicsGetCurrentContext()).

---

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)