TextHighlight show all

44 views
Skip to first unread message

Andrea Rinaldi

unread,
Nov 27, 2017, 11:02:15 AM11/27/17
to PDFTron WebViewer
Hello,
i would like to use the TextHighlight to show all the results of a search at the same time.
at this time i've used this function:

readerControl.searchText("Italia", ["None"]);

and it's work well but it's show only the first word.

can someone help me to resolve this little issue?


Justin Jung

unread,
Nov 28, 2017, 7:07:39 PM11/28/17
to PDFTron WebViewer
Hello,

You can use this build, which has a support for highlighting all search results at the same time.

Justin Jung
Software Developer
PDFTron Systems Inc.

Andrea Rinaldi

unread,
Nov 29, 2017, 11:55:36 AM11/29/17
to PDFTron WebViewer
So now this option: readerControl.docViewer.setTextHighlightColor('rgba(255, 0, 0, 0.5)'); 
didn't work. any fix? 

Matt Parizeau

unread,
Nov 29, 2017, 7:07:59 PM11/29/17
to PDFTron WebViewer
There is a new function to set the colors for searching, docViewer.setSearchHighlightColors which takes an object allowing you to change the color for all search results and the active search result. Here is an example of its use:
docViewer.setSearchHighlightColors({
  searchResult
: 'rgba(255, 0, 0, 0.5)',
  activeSearchResult
: 'rgba(0, 255, 0, 0.5)'
});

Matt Parizeau
Software Developer
PDFTron Systems Inc.
Reply all
Reply to author
Forward
0 new messages