function WordBoxIndexAtCharIndex(const Words: TPdfWordBoxes; CharIndex: Integer): Integer;
| Words | TPdfWordBoxes |
| CharIndex | Integer |
IntegerWordBoxIndexAtCharIndex возвращает индекс word box с нуля, чьи StartIndex и Count накрывают запрошенный индекс символа, или -1, если слово не найдено
По результату выбирайте, какой TPdfWordBox подсветить или выделить, когда движется курсор TTS
-1, когда CharIndex вне всех диапазонов словIndex := WordBoxIndexAtCharIndex(Words, PdfView1.CurrentCharIndex);
if Index >= 0 then
PdfView1.SelectWordBox(Words[Index]);