PDFium Delphi Component Docs

SelectLineAt method

Component: TPdfView  ·  Unit: PDFium
Selects the visual text line containing a page character index

Syntax

function SelectLineAt(Page, CharIndex: Integer): Boolean;

Parameters

PageInteger. One-based page number
CharIndexInteger. Zero-based character index within the page

Return Value

Boolean. True when the page and character index identify a visual text line that can be selected

Description

SelectLineAt examines the neighbouring character boxes around CharIndex and selects the contiguous range on the same visual line

The method uses the same visual line boundaries as triple-click selection and Shift+Home or Shift+End, then updates selection painting and OnSelectionChange through the standard selection pipeline

Remarks

Example

if PdfView1.SelectLineAt(1, 0) then
  Memo1.Lines.Text := PdfView1.SelectedText;

See Also

SelectTextRange, SelectionRanges, SelectionRectangles, SelectedText