PDFium Delphi Component Docs

TrackReadingWordAt method

Component: TPdfView  ·  Unit: PDFium
Maps a page character offset to the containing TPdfWordBox, highlights it, and returns the word index

Syntax

function TrackReadingWordAt(PageNumber, CharIndex: Integer): Integer;

Description

Maps a page character offset to the containing TPdfWordBox, highlights it, and returns the word index

Remarks

ReadingWordPrefetch optionally warms adjacent-page geometry in a bounded LRU pool; document/content revisions invalidate cached words, and an oversized requested page retains the legacy active working-set behavior

Example

var WordIndex: Integer;
begin
  WordIndex := PdfView1.TrackReadingWordAt(PdfView1.PageNumber, Voice.Status.InputWordPosition);
end;

See Also

PageWordBoxes, SetReadingWord, ClearReadingWord, ReadingWordColor, ReadingWordFollow, SetReadingHighlight