PDFium Delphi Component Docs

SelectWordSpan メソッド

コンポーネント: TPdfView  ·  ユニット: PDFium
同じページ上の TPdfWordBox レコード範囲を 1 つの TPdfView テキスト選択として選択します

構文

function SelectWordSpan(const Words: TPdfWordBoxes; StartIndex, EndIndex: Integer): Boolean;

パラメーター

WordsTPdfWordBoxes
StartIndexInteger
EndIndexInteger

戻り値

Boolean

説明

SelectWordSpan は要求された単語インデックスを丸め、両端が同じページに載っていることを確認したうえで、結合した文字範囲を選択します

現在の読み上げ単語やフレーズに、実際のビューアーのテキスト選択を与えたいときは PageWordBoxes と組み合わせて使います

備考

例

var Words: TPdfWordBoxes;
begin
  Words := PdfView1.PageWordBoxes;
  PdfView1.SelectWordSpan(Words, 0, 4);
end;

関連項目

PageWordBoxes, SelectWordBox, SelectTextRange, WordBoxIndexAtCharIndex