We use TextSearch to find text occurrences in a PDF and display the
ambient string in a tree view. When the user clicks a node, we want to
show the occurrence in the PDF.
We save the location of an occurence using Highlights.GetQuads().
After that, we can successfully convert the quads using
ConvPagePtToScreenPt() and set the correct selection using
However, pdfViewCtrl does not bring the selection into view, it simply
remains at the beginning of the document (contrary to the
SelectByHighlights() method). How can I do that?
I have tried with
pdfView.ConvScreenPtToCanvasPt(ref x1, ref y1); // y1 is the screen
point used by SelectByRect()
This does not work either, because for some reason the scrolling
position is not far enough.
How can I bring a selection into view like the SelectByHighlights()
Thank you in advance,