Ability to Highlight Multiple Search Terms #5220

If PDF document was part of a document search would like the ability to highlight multiple simultaneous terms and/or phrases that were returned as a search result. Currently there is no way to do this.

Change allows search terms to be passed in via URL parameter (search = terms list). The terms will all be highlighted with the same classes used in the findbar. All instances of all terms will be highlighted. Each term must be separated by a space (%20) and each phrase must be separated with an equals (%3d). The document will scroll to the match nearest to the top of the page after loading. Would like the scroll to be animated, but too much effort without another library or jquery at this time.

Examples:

unix dos windows =>  &search=unix%20dos%20windows
"sales manager" McDonalds => &search=sales%3dmanager%20McDonalds 

Also allows terms to be sent in via parent URL if using iframes and/or multiple pdf viewers on  same search result. This allows the iframes to load different documents without having to append the search terms each time.
> Are we permitted to extend the spec but remain compatible with the openPDF parameters? or must we adhere to the spec only.

We can extend, but we need to know that not only you will benefit from this feature and its something we can build upon. The bottom line is you have to convince a reviewer(s) that it's a needed feature for PDF.js project, and following the openPDF parameters spec (e.g. be backwards compatible to) is a simplest way to do it.