<!--
{
  "availability" : [
    "macOS: 10.4.0 - 10.12.0"
  ],
  "documentType" : "symbol",
  "framework" : "PDFKit",
  "identifier" : "/documentation/PDFKit/PDFView/draw(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "PDFKit"
    ],
    "preciseIdentifier" : "c:objc(cs)PDFView(im)drawPage:"
  },
  "title" : "draw(_:)"
}
-->

# draw(_:)

Draw and render a visible page.

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

## Discussion

Do not invoke this method, except by invoking it on `super` from a subclass.

The `PDFView` class calls [`draw(_:)`](/documentation/PDFKit/PDFView/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.

---

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)