PDF.js Express Version
Detailed description of issue
Need to highlight words in an array sent from server. Currently highlighting is only working for the last string of array.
Expected behaviour
All words in an array must be highlighted as the doc is loaded.
Link to document
{Provide a link to the document in question if possible}
Code snippet
let arr = [‘MAX’, ‘APR’, ‘PAR38’]
for (let i = 0; i < arr.length; i++) {
instance.docViewer.setSearchHighlightColors({
searchResult: 'rgba(0, 255, 0, 0.5)',
activeSearchResult: 'rgba(0, 255, 0, 0.5)'
});
instance.searchText(arr[i])
}
instance.closeElement('searchPanel');