---
title: "draw(with:in:)"
framework: pdfkit
role: symbol
role_heading: Instance Method
path: "pdfkit/pdfannotation/draw(with:in:)"
---

# draw(with:in:)

Draws the annotation in a graphics context using page-space coordinates relative to the origin of the specified box.

## Declaration

```swift
func draw(with box: PDFDisplayBox, in context: CGContext)
```

## Parameters

- `box`: The display box that represents the rectangle to draw the annotation in, in page-space coordinates.
- `context`: The graphics context to draw the annotation in.

## Discussion

Discussion Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.

## See Also

### Managing Annotation Drawing and Output

- [shouldDisplay](pdfkit/pdfannotation/shoulddisplay.md)
- [shouldPrint](pdfkit/pdfannotation/shouldprint.md)
