---
title: "draw(_:)"
framework: pdfkit
role: symbol
role_heading: Instance Method
path: "pdfkit/pdfview/draw(_:)"
---

# draw(_:)

Draw and render a visible page.

## Declaration

```swift
func draw(_ page: PDFPage)
```

## Discussion

Discussion Do not invoke this method, except by invoking it on super from a subclass. The PDFView class calls draw(_:) as necessary for each visible page that requires rendering. In the PDFView class, this method erases page to white, calls [page drawInRect: pageRect withBox: [self displayBox]] , and then draws the selection, if any. You can override this method to draw on top of a PDF page or to control how pages are drawn. In these cases, invoke this method on super and then perform custom drawing on top of the PDF page.

## See Also

### Rendering the View and Printing

- [drawPagePost(_:)](pdfkit/pdfview/drawpagepost(_:).md)
- [print(with:autoRotate:)](pdfkit/pdfview/print(with:autorotate:).md)
- [print(with:autoRotate:pageScaling:)](pdfkit/pdfview/print(with:autorotate:pagescaling:).md)
