PDFium Component Docs

SelectWordSpan method

Component: TPdfView  ·  Unit: PDFium
Selects a same-page span of TPdfWordBox records as one TPdfView text selection

Syntax

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

Parameters

WordsTPdfWordBoxes
StartIndexInteger
EndIndexInteger

Return Value

Boolean

Description

SelectWordSpan clamps the requested word indexes, requires both endpoints on the same page, then selects the combined character range

Use it with PageWordBoxes when the current spoken word or phrase needs a real viewer text selection

Remarks

Example

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

See Also

PageWordBoxes, SelectWordBox, SelectTextRange, WordBoxIndexAtCharIndex