-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Search matches characters across new lines #2806
Comments
That is not the only case where the search returns wrong matches or fails to find the correct matches. The PDFFindController.pageContents object, which PDFJS's find method uses to return search matches, often doesn't reflect exactly what a page's text content actually is. In my add-on, FindBar Tweak, I use the same object in the same way to retrieve find results from pdf documents. Through its Find in All Tabs feature, the limitations of this object are very apparent:
At least the space characters should more closely reflect the actual document; newline characters aren't as critical since they are never in a search query anyway, a single space character in place of newlines would be a close enough solution in my opinion. I would love to try and help fix this myself, but I looked into the code that builds this object and I don't think I have enough knowledge of PDF.JS's rendering mechanism to be able to help with this... However, I hope my add-on can somehow help with debugging this, since it can show the contents of this object in an easy and direct way without having to manually search all over the pdf pages to know if the object's text contents are accurate. |
Changing block |
A similar problem is solved in #5783. |
I know this is an old thread, but anyone knows if this is issue was solved? |
Just observing this with the default tracemonkey paper.
Seems it needs some sort of checks to ensure that search will not return these results?
The text was updated successfully, but these errors were encountered: