function SpokenToPageChar(const Spoken: TPdfSpokenText; SpokenOffset: Integer; out Page, CharIndex: Integer): Boolean;
| Spoken | TPdfSpokenText - Spoken text and span mapping |
| SpokenOffset | Integer - Zero-based character offset in Spoken.Text |
| Page | Integer - Receives the one-based source page number |
| CharIndex | Integer - Receives the zero-based FTextPage character index |
True when the offset maps to a source range, otherwise FalseThe function scans the span table and returns the page and source character index owned by the first span that covers the spoken offset
Offsets that land on an unmapped separator before a mapped run clamp to that run's first source character; spoken runs longer than the source range clamp to the last source character
if SpokenToPageChar(Spoken, SpokenOffset, PageNumber, CharIndex) then
PdfView1.TrackReadingWordAt(PageNumber, CharIndex);