Search result not highlighting some results

PDF.js Express Version

Detailed description of issue
When searching this document for the term anger it’s finding it however on page 114 it’s not actually highlighting the term. Also I noticed when I try to highlight some of the text on page 114 I am unable to, or it will only highlight sections and not all of it.

Expected behaviour
All search results should get highlighted.

When attempting to highlight text, all characters should get highlighted as well.

Does your issue happen with every document, or just one?
Only tested this one so far.

Link to document

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:


Hey there,

Thanks for the bug report - this is a duplicate of Search feature not finding results of available words - #2 by system so I am going to close this ticket to keep the conversation in one place.


Hey @Logan is this one currently being worked on for the next release?

Hey there!

I spent a couple days trying to fix this issue, however after a bit of time I came to the conclusion that the issue is caused by the PDF.js rendering engine providing incorrect text positioning, which we do not support.

The text formatting in this specific document is a also bit wonky. You will see that the native PDF.js demo has a hard time highlight the word correctly as well (although they do an OK job still):


Since we do not support PDF.js rendering bugs, we will not investigate this bug any further. We may try to make improvements to our text selection in the future which may fix this bug as a side effect, but I cannot promise anything for the time being.

If you do need extremely accurate text highlighting, you can check out our sister product, PDFTron WebViewer which handles this document just fine.

Sorry for the inconvenience.


Alright, understandable thanks.

1 Like