Hi Team
After clearing search text, search result showing previous value
For Example: I am searching text “to”. search result showing 8 but I am removing search text. it showing 8 result.
docViewer.on(‘documentLoaded’, () => {
const searchPattern = ‘text to search’;
// searchPattern can be something like “search*m” with “wildcard” option set to true
// searchPattern can be something like “search1|search2” with “regex” option set to true
// options default values are false
const searchOptions = {
caseSensitive: true, // match case
wholeWord: true, // match whole words only
wildcard: false, // allow using '*' as a wildcard value
regex: false, // string is treated as a regular expression
searchUp: false, // search from the end of the document upwards
ambientString: true, // return ambient string as part of the result
};
instance.addSearchListener(searchListener);
// start search after document loads
instance.searchTextFull(searchPattern, searchOptions);
This is the expected behavior. The search is only actually triggered when the search button is clicked, then it will take the search input value and use it as the input.
Let me know if you have any further questions.
Best Regards,
Diego Felix
Web Software Developer
PDFTron Systems, Inc. www.pdftron.com
CONFIDENTIALITY NOTICE: This message (and any attachment to it) is intended only for the use of the individual or entity to which it is addressed in the header, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. Any reproduction, distribution, modification or use of the contents of this message (and any attachment to it) by any individual or entity other than the intended recipient is prohibited. If you have received this communication in error, please notify us immediately and delete the original.
I really can’t reproduce this issue on WebViewer 7.3. Would upgrade your WebViewer version to 7.3 be possible? Maybe this was an issue that is already solved.
Best Regards,
Diego Felix
Web Software Developer
PDFTron Systems, Inc.
CONFIDENTIALITY NOTICE: This message (and any attachment to it) is intended only for the use of the individual or entity to which it is addressed in the header, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. Any reproduction, distribution, modification or use of the contents of this message (and any attachment to it) by any individual or entity other than the intended recipient is prohibited. If you have received this communication in error, please notify us immediately and delete the original.