Docs de PDFiumVCL

SelectedText function

Esta entrada API conserva identificadores, firmas, bloques de código y términos PDF en su forma original.
Component: TPdfView  ·  Unit: PDFium
Returns the currently selected text as a wide string.

Syntax

function SelectedText: WString;

Description

Extracts the text under the active selection through FPDFText_GetText and returns it as a Unicode string. In spread cross-page selection, the per-page slices are joined in page-ascending order with a #13#10 (CR/LF) separator so the round-tripped text reads like normal multi-line content.

Returns the empty string when nothing is selected.

Remarks

Example

ShowMessage(string(PdfView1.SelectedText));

See Also

HasSelection, SelectionCharCount, CopySelectionToClipboard