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.
Unfortunately, activation email could not send to your email. Please try again.

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

Thread ID:

Created:

Updated:

Platform:

Replies:

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

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 09:40 AM

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.

Thanks,

Uthistran S.


Attachment: Sample_23974e02.zip

Chuck Berg
Replied On March 18, 2014 02:28 PM

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 08:58 AM

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.
Thanks,
Uthistran S.

Attachment: Capture_98c0b2c9.zip

Chuck Berg
Replied On March 20, 2014 11:58 AM

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 09:16 AM

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?

Thanks,

Uthistran S.


CONFIRMATION

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.

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.

;