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

Mouse coordinates to document coordinates

Thread ID:





124682 Jun 22,2016 04:33 PM UTC Oct 24,2017 12:45 PM UTC WPF 3
Tags: PdfViewer
Asked On June 22, 2016 04:33 PM UTC


I experimented with the PDFViewer control. I am trying to figure out how to get a coordinate in the document coordinate system from a given mouse coordinate.
My sample PDF's single page has a height of 792 and width of 612. I am not sure, which unit those coordinates are in. I can for sure say, that those don't correlate to pixels as on my screen.
So if I click on the pdf document, the current mouse position shall be converted to a document coordinate. This should be possible regardless of the zoom factor applied to the viewer control and regardless of any "free space" around the actual document in the viewer.

Thanks for your support.

Sathish Sivakumar [Syncfusion]
Replied On June 23, 2016 01:26 PM UTC

Hi Florian, 
We have created the Direct-trac support incident to this forum for further follow up, please login to your direct trac account to know more about details about incident.  

Replied On October 23, 2017 01:20 PM UTC

Hi Team,

Is this feature can be achieved, can we get the mouse coordinates on pdf?

Sathish Sivakumar [Syncfusion]
Replied On October 24, 2017 12:45 PM UTC

Hi Amit, 
Thank you for your patience.  
We have already provided the support for “Finding coordinate of the mouse click over the page in the PDF document” using PdfViewer control in WPF from the Essential Studio Vol 2 2016. 
Please find the code snippet to find the coordinate of the mouse click over the page in the PDF document:  
Code Snippet:  
//Creating PageClicked event to find the coordinate of the mouse click over the page in the PDF document  
pdfViewer.PageClicked += pdfViewer_PageClicked;  
//PageClicked event  
void pdfViewer_PageClicked(object sender, Syncfusion.Windows.PdfViewer.PageClickedEventArgs args)  
Note: PageClickedEventArgs contains following Properties  
1.       PageIndex : Current index of the page in the PDF document being clicked using Mouse  
2.       Position : Returns the coordinates (in Pixels) of the mouse click over the page in the PDF document  
We can convert the pixel coordinate to the document coordinate (i.e. Point) using PdfUnitConvertor class.  
  • The coordinates returned by the PageClicked event does not depend on the zoom factor applied to the PdfViewerControl. 
  • The PageClicked event cannot be triggered if we clicked the mouse on the free space around the page in the PdfViewerControl. 
We have also created a simple sample to find the coordinates of the mouse click over the page in the PDF document:  
Please let us know if you need further assistance.  


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

or the page will be automatically redirected to 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