PDFiumPas 文件

TrackReadingWordAt 方法

组件: TPdfView  ·  单元: PDFium
把页面字符偏移映射到包含它的 TPdfWordBox,高亮该词并返回词索引

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

Example

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

See Also

PageWordBoxes, SetReadingWord, ClearReadingWord, ReadingWordColor, ReadingWordFollow, SetReadingHighlight