getCharacterIndex

fun getCharacterIndex(pageIndex: Int, x: Double, y: Double, xTolerance: Double, yTolerance: Double): Int

Get the index of a character at or nearby a certain position on the page

Return

The zero-based index of the character at, or nearby the point (x,y). If there is no character at or nearby the point, return value will be -1. If an error occurs, -3 will be returned.

Parameters

pageIndex

index of page.

x

X position in PDF "user space".

y

Y position in PDF "user space".

xTolerance

An x-axis tolerance value for character hit detection, in point unit.

yTolerance

A y-axis tolerance value for character hit detection, in point unit.