Hi,
I'm working on pdfviewer searchtext function. The error occurred after clicking few times on left side text. Javascript search function as below. A list of text on left side bar to allow user to click and pass the text to search function and auto scroll to the specific page.
javascript;
function searchText(text){
var viewer = document.getElementById('iframe').contentWindow.document.getElementById('pdfviewer').ej2_instances[0];
viewer.textSearchModule.cancelTextSearch();
console.log(text);
viewer.textSearchModule.searchText(text);
document.getElementById('iframe').scrollIntoView();
}
Hi Kuan,
We were unable to reproduce the issue “Web-service is not listening” with the provided details in a simple sample. The line “viewer.textSearchModule.searchText(text);” itself auto scrolls to the specific page where the specified text is found. You can also call the goToPage() method as below to go to a specified page.
|
viewer.navigationModule.goToPage(25); |
The sample we tried at our end can be downloaded from the following link. Kindly share the modified sample to replicate the issue at our end so that we can check at our end and provide a prompt solution at the earliest.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/GettingStarted_Core1915270429
Regards,
Shamini
Hi Shamini,
I had referred your sample project and changed my code, it works now. Thanks.
By the ways, I try to search the whole sentence like below screenshot with yellow highlighted but viewer shows message as "Viewer has finished searching the document. No more matches were found".
Does pdfviewer support sentence search?
Moreover, can pdfviewer had a loader when run the searchText function? It takes sometime to highlight the text and no loading sign on the viewer, especially for those document more than 1000 pages.
viewer.textSearchModule.searchText(text);
Regards,
Kuan Long
Hi Kuan,
|
Query |
Response |
|
Does pdfviewer support sentence search? |
We have already logged an issue “Sentence search in the PDF Viewer is not working properly” and fixed it internally. The fix for the issue will be available in our upcoming 2022 Volume 1 main release on April 4, 2022 (tentatively). You can track the status of the issue through the following link.
Feedback: https://www.syncfusion.com/feedback/29404/sentence-search-in-the-pdf-viewer-is-not-working-properly |
|
Moreover, can pdfviewer had a loader when run the searchText function? It takes sometime to highlight the text and no loading sign on the viewer, especially for those document more than 1000 pages. |
We have provided the loader over here inside the text search box as in the below screenshot.
|
Regards,
Shamini
Hi Shamini
Thanks for your response. I see nothing when I click inside the link.
Feedback: https://www.syncfusion.com/feedback/29404/sentence-search-in-the-pdf-viewer-is-not-working-properly
Regards,
Kuan
Hi Kuan,
Sorry for the inconvenience. The fix was not included and we can search only the single line sentence with the latest version v20.1.0.47. We will fix the issue with searching multiline sentences in our upcoming weekly NuGet release on April 20, 2022.
Regarding the feedback visibility, there was a technical glitch in viewing the feedback yesterday which has been resolved today. You can view it now to track the status of the issue.
https://www.syncfusion.com/feedback/29404/sentence-search-in-the-pdf-viewer-is-not-working-properly
Regards,
Shamini
Hi Kuan,
Sorry for the inconvenience. The fix for the reported issue was not included in our latest release. However, it will be included in our upcoming SP release that is expected to be rolled out by mid of May 2022.
Regards,
Shamini
Hi Kuan,
Sorry for the inconvenience. The fix for the reported issue was not included in our latest release. However, it will be included in our upcoming weekly release on May 25, 2022.
Regards,
Shamini
Sorry for the inconvenience. The fix was not included in our latest weekly NuGet release. However, we will include the fix in our upcoming weekly NuGet release without further delay on June 1, 2022.
Regards,
Shamini
Sorry for the inconvenience. The fix was not included in our latest weekly NuGet release. However, we will include the fix in our upcoming weekly NuGet release without further delay on June 8, 2022.
Regards,
Shamini
Sorry for the inconvenience. The fix was not included in our latest weekly NuGet release. However, we will include the fix in our upcoming weekly NuGet release without further delay on June 22, 2022.
Regards,
Shamini
Hi kuan,
We have fixed the reported issue “Sentence search in the PDF Viewer is not working properly” and the fix for the reported issue was included in our latest weekly release v20.1.0.61. Kindly upgrade to that version to get the issue resolved.
Packages:
CDN Links:
Thanks Visvesvar Venkatesan