---
title: "page(for:nearest:)"
framework: pdfkit
role: symbol
role_heading: Instance Method
path: "pdfkit/pdfview/page(for:nearest:)"
---

# page(for:nearest:)

Returns the page containing a point specified in view coordinates.

## Declaration

```swift
func page(for point: CGPoint, nearest: Bool) -> PDFPage?
```

```swift
func page(for point: NSPoint, nearest: Bool) -> PDFPage?
```

## Discussion

Discussion Returns NULL if there’s no page at the specified point and nearest is set to false.

## See Also

### Converting Page and View Points

- [convert(_:to:)](pdfkit/pdfview/convert(_:to:)-9twqk.md)
- [convert(_:to:)](pdfkit/pdfview/convert(_:to:)-8cp0c.md)
- [convert(_:from:)](pdfkit/pdfview/convert(_:from:)-4evlx.md)
- [convert(_:from:)](pdfkit/pdfview/convert(_:from:)-9xv1z.md)
