OK, I've found that I have to call SetVScrollPos with screen coordinates, not with canvas coordinates.
I think it is helpful if you add the coordinate system to every section in the documentation. I had already struggled with SelectByRect until I found out that it uses screen coordinates.
Am 14.02.2011 um 09:24 schrieb "Thomas" <email@example.com>:
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,