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

# drawContentForPage(at:in:)

Draws the content of a page.

## Declaration

```swift
func drawContentForPage(at pageIndex: Int, in contentRect: CGRect)
```

## Parameters

- `pageIndex`: The index of the page on which to draw content.
- `contentRect`: The area in which to draw content, in the coordinate system of the printable rectangle. This area is equal to doc://com.apple.uikit/documentation/UIKit/UIPrintPageRenderer/printableRect minus doc://com.apple.uikit/documentation/UIKit/UIPrintPageRenderer/headerHeight and doc://com.apple.uikit/documentation/UIKit/UIPrintPageRenderer/footerHeight.

## Discussion

Discussion The default implementation of this method does nothing. Override this method to draw the content of the specified page. The system configures this method for drawing to the current graphics context according to UIGraphicsGetCurrentContext().

## See Also

### Drawing a page

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