I’m trying to use the mouse Events raised by the WebViewer in order to add some annotations into my document.
Code below is working excepted that there is a shift between the position of my freeText and the mouse coordinates…
How could I do to make the position of the annotation match with the position of my mouse cursor when there is a mouseUp Event.
You are super close, there are just a couple extra steps you need to do. Converting mouse coordinates to page coordinates is a bit tricky because there is a lot to take into account - zoom, page rotation, page dimensions etc.
Here is some code that converts mouse coordinates to page coordinates: