---
title: "draw(in:forPageAt:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiprintformatter/draw(in:forpageat:)"
---

# draw(in:forPageAt:)

Draws the portion of a print formatter’s content for the specified area of the specified page.

## Declaration

```swift
func draw(in rect: CGRect, forPageAt pageIndex: Int)
```

## Parameters

- `rect`: The area in which to draw the content.
- `pageIndex`: The number of the page of content to draw.

## Discussion

Discussion This method is called by the default implementation of drawPrintFormatter:forPageAtIndex: of the UIPrintPageRenderer class for each print formatter associated with a page.

## See Also

### Drawing the content

- [rectForPage(at:)](uikit/uiprintformatter/rectforpage(at:).md)
