Selection based on regions

Currently we are working on a Winforms application written in C# (we are using the 6.6.1 sdk).

We have a document with multiple regions in it. These regions are ordered, they start with number 1 and can go to …These regions are saved in pdf coords.

The next big thing we would like to do is limiting the text selection. This selection should be based on the regions.
Text that lays in between 2 regions may not be selected, only text within those regions is valid!

I’ve done some research but I can’t seem to figered it out how this is possible with the pdfviewctrl?

Kind regards,
Steve

That depends on what PDFViewCtrl you are using. What platform/frameword are you on?

I’m on the .NET 4.0 framework (Winforms)

SDK 6.7.1 (november release)
Op vrijdag 2 december 2016 23:13:25 UTC+1 schreef Ryan:

That depends on what PDFViewCtrl you are using. What platform/frameword are you on?

Will you ever be selection text in two regions at the same time? If not, you just have to bound your text selection points to be inside the rectangle you provided.

If you want to be able to select text in multiple regions, what you want to do is not possible using the PDFViewCtrl, as all text selection and highlighting is internal.

However, if you used the PDFViewWPF, this would be possible. The PDFViewWPF does not automatically highlight selection, which would let you select and save the quads of the highlighted text for each region independently. In the PDFViewWPFTest project, text selection is done by the TextSelect tool in PDFViewWPFTools. You will have to modify the selection to loop over each region that is being selected in, and then in the end combine the results before you show the highlights. We will be happy to help you with any specific questions you have about how to best do this.