PDFium Component Docs

SelectionCharCount function

Component: TPdfView  ·  Unit: PDFium
Vraća ukupan broj trenutno odabranih znakova.

Syntax

function SelectionCharCount: Integer;

Description

Zbroj broja znakova kroz sve raspone odabira po stranici. U načinu odabira jedne stranice ovo je samo duljina jednog raspona; u proširenomd cross-page selection it is the sum across both ranges.

Counts PDF character positions, not text-string code points after extraction — ligatures and generated characters (e.g. an auto-inserted CR/LF between visual lines) count as their underlying PDF character slots, matching the indices returned by CharacterIndexAtPos.

Remarks

Example

StatusBar1.SimpleText :=
  Format('Selected: %d characters', [PdfView1.SelectionCharCount]);

See Also

HasSelection, SelectedText, OnSelectionChange