agentcooper / react-pdf-highlighter

Set of React components for PDF annotation
https://agentcooper.github.io/react-pdf-highlighter/
MIT License
1.04k stars 407 forks source link

Array of strings to automatically create highlights #245

Open SimeriaIonut opened 1 year ago

SimeriaIonut commented 1 year ago

Is there an easy way to have an array of strings and find them in the PDF and create a highlight for that found string? I don't see a way to look for strings in the PDF and also to get back the boundingRect for it.

Thanks!

straeter commented 1 year ago

@SimeriaIonut this was already discussed here: https://github.com/agentcooper/react-pdf-highlighter/issues/176

SimeriaIonut commented 1 year ago

@straeter that doesn't seem to return any positioning of the found string (I would need that to create the highlight programatically). Or am I missing something?

straeter commented 1 year ago

@SimeriaIonut yes you are right, it just highlights the text without giving back the positions. Actually, I am also working on a solution to get the positions from search queries, it seems to be quite tricky. Let's keep each other updated on this

AlfredMadere commented 3 months ago

Any progress on this?