Closed salimbene closed 1 month ago
Do you also have PDF coordinates with your search results? If so, you can set usePdfCoordinates
to true
when passing an array of highlights: https://github.com/agentcooper/react-pdf-highlighter/blob/b576d7f95172bba45a1d043400c6b83c04570dfb/src/types.js#L31.
Hey agentcooper. No, I don't have coordinates with my search results. In case you are familiar with, I'm using IBM Watson Discovery to search in PDF that are ingested in discovery. The API provides search results and the document name, but it doesnt provide coordinates. I would need to search a passage within the pdf manually to have it highlighted.
How can I find programmatically the text in the PDF? I would like to search the text using an api such as this one provided by ngx-extended-pdf-viewer, , see the example in https://pdfviewer.net/find So, once I passed the search text and it is highlighted in the document, the user could add the annotation.
Hello there...
Is is possible to dynamically hightlight from text? I have an app that searches information on pdf's and present the users a list of results. Each results is a paragraph. I would like to present the option of opening the PDF and show the found passage highlighted. I've been looking at the code, but the coordinates from the examples is hardcoded. I see that you can manually highlight text, but i didn't find a way to programatically calculate the coordinates search by searching text.
Thanks! And kudos, great library!