The bounding rectangles returned by PdfViewerControl.FindText are in document coordinates, and are independent of the size and position of the document display.
The coordinates obtained when capturing a Mouse Click are dependent of the size and position of the document display.
How do I compare these two coordinate systems to test for a Mouse Click that is inside a bounding rectangle?
We can match the mouse coordinates to bounding rectangle returned from FindText in a MouseCLick event handler by the attached “work around” sample.
Run this sample, and double click over “spine” in the title, if the mouse position is inside the coordinates of “Spine”, then we will get a message box.
Please, let us know whether this above sample suits your requirement.
The sample does not work at all. No matter where I click, I never see the message box.
I've run your code, and stepped through it with the debugger, and the mouse coordinates do not match the bounding box for the work "Spine" in the title. I have several patches installed from incidents 119486 and 119292 - perhaps that is having an impact.
We have updated the details about this forum in your incident #119486. Could you please follow the incident for the details on this?