PDF.js Express Version
Detailed description of issue
Error - Unhandled Promise rejection: TypeError: e.split is not a function
Expected behaviour
Should highlight all the words matching in the pdf.
Does your issue happen with every document, or just one?
{Answer here}
Link to document
{Provide a link to the document in question if possible}
Code snippet
let arr = [‘RAS’, ‘Cable’, ‘92780’]
var regexFromMyArray = new RegExp(arr.join("|"), ‘g’);
console.log(‘regex…’, regexFromMyArray)
instance.docViewer.setSearchHighlightColors({
searchResult: ‘rgba(0, 255, 0, 0.5)’,
activeSearchResult: ‘rgba(0, 255, 0, 0.5)’
});
instance.searchText(regexFromMyArray)