We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Compare coordinates from Mouse Click to coordinates returned from PdfViewerControl.FindText

Thread ID:





116001 Mar 14,2014 09:11 PM UTC Mar 25,2014 01:16 PM UTC WPF 5
Tags: PdfViewer
Chuck Berg
Asked On March 14, 2014 09:11 PM UTC

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?

Uthistran S [Syncfusion]
Replied On March 18, 2014 01:40 PM UTC

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.


Uthistran S.

Attachment: Sample_23974e02.zip

Chuck Berg
Replied On March 18, 2014 06:28 PM UTC

The sample does not work at all.  No matter where I click, I never see the message box.

Uthistran S [Syncfusion]
Replied On March 20, 2014 12:58 PM UTC

Hi Chuck,
Thank you for your update.
Please, run the work around sample and "double - click" over "Spine" in the Title, a message box will get displayed.
Attached the screenshot image that displays a Messagebox on double clicking "Spine" for your reference.
Please, let us know if you need any further assistance.
Uthistran S.

Attachment: Capture_98c0b2c9.zip

Chuck Berg
Replied On March 20, 2014 03:58 PM UTC

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.

Uthistran S [Syncfusion]
Replied On March 25, 2014 01:16 PM UTC

Hi Chuck,

 Thank you for your update.

We have updated the details about this forum in your incident #119486. Could you please follow the incident for the details on this?


Uthistran S.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon