function SelectWordSpan(const Words: TPdfWordBoxes; StartIndex, EndIndex: Integer): Boolean;
| Words | TPdfWordBoxes |
| StartIndex | Integer |
| EndIndex | Integer |
BooleanSelectWordSpan clamps the requested word indexes, requires both endpoints to be on the same page, then selects the combined character range
Use it with PageWordBoxes when the current spoken word or phrase needs a genuine viewer text selection
False when the requested range cannot be selectedvar Words: TPdfWordBoxes;
begin
Words := PdfView1.PageWordBoxes;
PdfView1.SelectWordSpan(Words, 0, 4);
end;