How do I select a region in PDFViewCtrl and copy text from that region?

Q:

How do I select a region in pdftron.PDF.PDFViewCtrl and copy text from
that region? Can you provide some example?
------------------
A:

You can use pdfview.Select(x1, y1, x2, y2) to select text based on the
current TextSelectionMode (which can be changed with
pdfview.SetTextSelectionMode(…) ).

You can obtain the selection with
pdfview.GetSelection().GetAsUnicode()