I currently show a pdf file with pdfviewer and would like to let the user to draw a rectangle on it. The application then capture the position of the rectangle corresponding to the pdf file (not the screen). I currently create a Graphincs control and draw the rectangle according to the user's cursor's coordinates. My question is how should I capture the coordinate of the drawn rectangle with respect to the pdf and how should I get the position of the mouse when the pdf is being scrolled or zoomed? Are there any example doing what I want?
Thank you very much