FTextPagefunction 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 FalseLa fonction parcourt la table des spans et renvoie la page et l'indice de caractère source détenus par le premier span qui couvre le décalage parlé
Les décalages qui tombent sur un séparateur non mappé avant une tranche mappée se rabattent sur le premier caractère source de cette tranche ; les tranches parlées plus longues que la plage source se rabattent sur le dernier caractère source
if SpokenToPageChar(Spoken, SpokenOffset, PageNumber, CharIndex) then
PdfView1.TrackReadingWordAt(PageNumber, CharIndex);