How do I extract the text selection from PDFView control?

Q: I am exploring the use of pdfnet sdk in my .net application.
My requirements are

1. Creation of pdf files.
2 Pdf viewer
3. Print pdf file
4. Search of a text within the pdf and show that text as selected in
4. Select a region in the pdf viewer then storing those co-ordinates
and then using those co-ordinates to extract text from that region,
looks like you have all the features but if you provide me a
example in your viewer code so that as a user I can draw a rectangle
on the desired text get the co-ordinates and based on those co-
ordiates should be able to get the text back.
A: You can use PDFNet SDK to create, view, print PDFs as well as
search for text and extract content.

As a starting point you may want to take a look at the following
sample projects:

For viewing PDF files please see PDFView and PDFViewSimple sample

Printing of PDF files is directly supported in PDFViewCtrl, but if you
need to perform server-side or programmatic printing you can use
StartPrintJob() as shown in PDFPrint sample

PDFViewCtrl also has built-in support for text searching and
highlighting (pdfviewctr.FindText()/SelectByRect()SelectByStruct()/
GetSelection()/HasSelection() etc.) and can also implement custom
tools (if necessary) as shown in PDFView sample (http://

PDFViewCtrl has a method called pdfviewctrl.HasSelection() which
returns true if the user made selection in the interactive viewer. You
can use pdfviewctrl.GetSelection() to obtain the selection object.

From the selection object you can extract the positioning information

(i.e. selection.GetQuads()) as well as the Unicode text

If you are looking for programmatic text extraction, please take a
look at TextExtract and TextSearch samples
( There are
many ways you can create PDF content (e.g. from text) as described in
the following KB article: