GetSelectedRegion

Viewer interaction, text

Description

Returns one of the retained marquee selections created by a vmSelect drag or by SelectRegion, including the text extracted from the region

The index is one-based and selections are ordered by creation; on failure every output field is zeroed and the extracted text is empty

Syntax

Delphi

Function TPDFlibViewer.GetSelectedRegion(Index: Integer; Out Selection: TPDFlibViewerSelection): Boolean;

Parameters

IndexOne-based selection index
SelectionReceives the page, the rectangle in top-down page points and the extracted text of the selection

Return values

FalseThe index is out of range; Selection is zeroed
TrueThe selection record was copied out

See also

TPDFlibViewer, GetTextInRegion, CopySelectedText, ClearSelectedRegions