---
title: "characterIndex(at:)"
framework: pdfkit
role: symbol
role_heading: Instance Method
path: "pdfkit/pdfpage/characterindex(at:)"
---

# characterIndex(at:)

Returns the character index value for the specified point in page space.

## Declaration

```swift
func characterIndex(at point: CGPoint) -> Int
```

```swift
func characterIndex(at point: NSPoint) -> Int
```

## Discussion

Discussion If there is no character at the specified point, the method returns -1. Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.

## See Also

### Working with Textual Content

- [numberOfCharacters](pdfkit/pdfpage/numberofcharacters.md)
- [string](pdfkit/pdfpage/string.md)
- [attributedString](pdfkit/pdfpage/attributedstring.md)
- [characterBounds(at:)](pdfkit/pdfpage/characterbounds(at:).md)
