title: .NET MVC pdf collect mouse click coordinates
body: <p>I am working on an application where I need to do the following.</p>
  
  <ul>
  <li>Let user upload .pdf document </li>
  <li>User defines several rectangular areas on document</li>
  <li>Later, another user will insert images into these rectangular areas</li>
  </ul>
  
  <p>The only part that is tripping me up is letting the user define the rectangular area on the document. I could let the user enter coordinates, but that isn't very user friendly. I would rather let the user click on the document to define where the rectangles should be.</p>
  
  <p>My first thought was to render the pdf as an image, then collect the coordinates where the user clicks on the image. The two issues I had with this were 1) finding a way to render the pdf as an image, and 2) multiple page documents would probably get crazy when it comes to translating the coordinates from the image to the pdf.</p>
  
  <p>I've been using PdfSharp to manipulate the files. To my knowledge, neither PdfSharp nor iTextSharp provide a way to render a pdf file as an image.</p>
  
  <p>I think that I could get away with even collecting just a single coordinate (e.g., the top left corner of the rectangle).</p>