-
-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to highlight multiple lines of text #98
Comments
the highlighting of text is very unstable. if there is one italic or bold text in the line, that line does not highlight. |
I would like to second this. It would be a great addition if you could it make this possible. Will it be made possible to add more than one highlighted sentence per page at some point? Btw good job creating this package! |
I would like to know your use cases. The |
I would like to use the current functionality but to highligt multiple sentences on a page. Lets say I have a page where both of these sentences are included: |
I did some experiments, it works as long as the text layer does not have any decoration ( i.e. bold or any other styles). when you have a pdf which has any styles, it cannot select those elements. It can select multiple lines of text if the texts are just plain-text. but if there is any other decoration, I see that the text layer creates spans to adjust the style, and that's where the highlighting breaks. The use-case: I have Chat-bot which answers the questions from the PDF, and also provide the chunk of the pdf which was used to answer the question. ( the chunk is just text, not formatted text(. and I want to highlight the chunk. |
Could you share the pdf of this issue? @vikramsoni2 |
here you go. just created a small app for demo purpose. if you notice, I am trying to highlight the same paragraph in both pages. the first one includes a small decoration in the text which breaks the highlight. in the second page, I remove the last ward to not include that decorated text and it works. https://stackblitz.com/edit/vitejs-vite-xcgtmn?file=src%2FApp.vue |
Any updates on this? this would be a great feature. |
If I want to highlight a paragraph of text, how do I do it? I see that the text-layer is generating spans of text for each lines. is there an easier way to pass a sentence in the highlight-text param so that it highlights the entire sentence ?
awesome work by the way!
The text was updated successfully, but these errors were encountered: