There is no way to cancel the search.

36 views
Skip to first unread message

Sagar Fargade

unread,
Nov 16, 2017, 11:52:08 AM11/16/17
to PDFTron WebViewer
Hello,

Need your assistance to cancel the search.

I am trying to string which is not present in the document, it will never goes in the condition :

else(result.resultCode === Text.ResultCode.e_done) {
// All pages searched.

Also need some help on to cancel the search. There is no way to stop the event
docViewer.textSearchInit which is initiated by search in the fie ReaderControl.js


Thanks
Sagar

Sagar Fargade

unread,
Nov 17, 2017, 11:50:40 AM11/17/17
to PDFTron WebViewer
Also when I try to search the string that is not present in the document, then the subsequent search not works as it never enters in the  me.docViewer.textSearchInit event present in the fullTextSearch function (ReaderControl.js)  for next search. (Try for large document having 200+ pages)  

Justin Jung

unread,
Nov 17, 2017, 3:34:02 PM11/17/17
to PDFTron WebViewer
You can try out the latest 3.0 branch build as it has some improvements for searching: http://www.pdftron.com/ID-zJWLuhTffd3c/WebViewer/WebViewer_3.0.1.62622.zip
The new build also has a cancel function which you can call as follows:

readerControl.docViewer.clearSearchResults();

Justin Jung
Software Developer
PDFTron Systems Inc.
Reply all
Reply to author
Forward
0 new messages