PDFium Delphi Component Docs

TrackReadingWordAt 方法

元件: TPdfView  ·  單元: PDFium
將頁面字元偏移對應到包含它的 TPdfWordBox,反白該詞並傳回詞索引

語法

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

說明

將頁面字元偏移對應到包含它的 TPdfWordBox,反白該字詞並傳回字詞索引

備註

ReadingWordPrefetch 可選用地在有界 LRU 池中預熱相鄰頁面幾何;文件/內容修訂版會使快取的單字失效,超過大小的要求頁面則維持既有的作用中工作集行為

範例

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

另請參閱

PageWordBoxes, SetReadingWord, ClearReadingWord, ReadingWordColor, ReadingWordFollow, SetReadingHighlight