function TextIndexToCharacterIndex(Index: Integer): Integer;
| Index | Integer. Zero-based offset within the string returned by Text |
| Result | Integer. Zero-based character index on the current page, or -1 when no character corresponds to that offset |
The inverse of CharacterIndexToTextIndex. Once a caller has found something in the extracted string, this locates the character behind it, which is the index every geometric query takes
With the character index in hand, CharacterRectangle gives the box to highlight and CharacterInfo gives colour, font, and matrix
A result of -1 means the offset does not map back to a character on the page