I’m using http://pdfobject.com/ jquery library to load the external pdf files into an html page. What I want to do is to overlay an Image at a specific position but I am struggling to fetch exact position of particular text inside the embedded pdf.
I’m going with not-so-valid solution using .mousemove() jquery function to track the mouse positions inside a div tag but the positions (pageX,pageY) remain the same even after scrolling the div.
How to achieve this?
As I know this solution is not viable in case of zoom in/out within a pdfviewer, Is there any other alternative available to overlay any object/element over a pdf viewer as accurately as possible?
You can get the vertical scroll offset with jQuery scrollTop():
Also see the updated example.