Sumatra PDF is a PDF, ePub, MOBI, CHM, XPS, DjVu, CBZ, CBR reader for Windows

Highlight and number search results

I was wondering if it would be simple to implement a feature to highlight all search results found within the documents (similar to what Google Chrome does), instead of just highlighting a single instance. Preferable as you type, which is what the current search function offers, but only for a single word at a time.

Also would be helpful to see how many instances of a word is found, and indicate which one you are currently looking at (e.g. 5/9).

I know at least the first suggestion was mentioned in the old forum a while ago, just thought I’d mention it again since I think people may find it useful.

Keep up the good work!


A similar request was made in this forum as well and I linked to a GitHub issue you might like to +1:

KJK had some help recently on this topic see source code, open / closed issues

MY BAD sorry

that feature is only available in CHM UseFixedPageUI = false
and is limited to a page at a time it does NOT address “search across pages” in that situation

This would be a very good and important feature. Is there any plans to implement this any time soon?

i find this also VERY important.
BTW: the description of sumatra itself misleads the reader into believing that such a feature is already present: “convenient text search engine that will highlight all the instances found”. when actually it just highlights one at a time.

Thanks for the feedback.
The “Misrepresentation” was made on another site by Francisco Martínez, I have asked that it be re-worded so as not to suggest such a feature will be found in current SumatraPDF.

One reason that SumatraPDF is so fast compared to many products (with many more of such features) is that depending on resources and formats, parts of a document are loaded quickly whilst other pages may not be loaded till later. That is not always the case and for a few simpler files it might be possible to provide a count of each letter as it is typed, however as the word search increases in length the “hits” would need to be constantly reduced and so on.
SumatraPDF does not waste memory resources on keeping full tables of words per page or document, just more simply a stream of characters that provide a first match in a large block of characters. Anyone can add such a feature but beware the first complaint is most likely to be Acme Reader is faster.

MuPDF is the PDF engine that SumatraPDF uses (and the fast MuPDF-GL showcase app will itself only find the nearest match) Mutool can be scripted such that I can personally load in SumatraPDF an addin script written by Tamir Evan (one of our supporters) to find/highlight/count “all matches on page” however it takes seconds extra per page to do so