---
title: "drawPage(at:in:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiprintpagerenderer/drawpage(at:in:)"
---

# drawPage(at:in:)

Draws a page of content for the printer.

## Declaration

```swift
func drawPage(at pageIndex: Int, in printableRect: CGRect)
```

## Parameters

- `pageIndex`: The index of the page to draw.
- `printableRect`: The rectangle in which to draw printable content.

## Discussion

Discussion The default implementation of this method calls, in sequence, drawHeaderForPage(at:in:), drawContentForPage(at:in:), drawPrintFormatter(_:forPageAt:), and drawFooterForPage(at:in:). Override this method to draw the specified page of content for the printer. The system configures this method for drawing to the current graphics context according to UIGraphicsGetCurrentContext().

## See Also

### Drawing a page

- [drawHeaderForPage(at:in:)](uikit/uiprintpagerenderer/drawheaderforpage(at:in:).md)
- [drawContentForPage(at:in:)](uikit/uiprintpagerenderer/drawcontentforpage(at:in:).md)
- [drawPrintFormatter(_:forPageAt:)](uikit/uiprintpagerenderer/drawprintformatter(_:forpageat:).md)
- [drawFooterForPage(at:in:)](uikit/uiprintpagerenderer/drawfooterforpage(at:in:).md)
