Please give a brief summary of your issue:
(Think of this as an email subject)
I want to give user’s an ability to select a particular text from pdf page
Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)
I want to give user to select any text from a pdf page and I want to use that selected text to save in my database also I I want to extract the co-ordinates of selected text.
How can I achieve this in react.
For example In this image I have highlighted a number and I have to select that number and add that in my databse
Hi There,
You can use our getSelectedText and getSelectedTextQuads methods.
Assuming you are on the text selection tool, you can get the selected text on mouse up event like this:
The x and y refers to the viewer page coordinates system in WebViewer.
There are detailed explanations of how the coordinate systems work in WebViewer in the above link, but as a quick example, if you want to convert the xy coordinates from your mouse event to the viewer page coordinates, the easiest way is to use getViewerCoordinatesFromMouseEvent API: