Hi,
I'm using the code :-
SearchText(strFileSearch_Term1, false);
to search for a text reference on the DocumentLoaded event of pdfviewer server...
Sometimes the text isn't found and i get the message dialog below, it would be really handy and a smoother user experience if i could suppress this message dialog, is this possible? It didn't seem to do this on the previous versions of the pdfviewer...
Thanks
Dean
Hi Dean,
Currently, we don’t have an option to suppress the “Viewer has finished searching the document. No more matches found” dialog. Could you please let us know why do you want to suppress the dialog? If you could share your requirement in detail about how you want to handle this at your end, it will be helpful for us to analyze further.
Regards,
Shamini
Hi,
Thanks for the reply, I've managed to get around the issue I was having by calling the .Unload() method on the pdfviewer before i change the DocumentPath property.
Basically in my app the user types in a text reference to search a pdf file archive, this in turn calls a dataservice to searches the database and displays the results in an sfgrid, the OnActionComplete and RowSelected events of the sfgrid change the DocumentPath property of the PdfViewer to display the file in question and i then want to highlight in the pdf file the search term that the user entered...
So I have have a handler on the DocumentLoaded event of the pdfviewer that calls the SearchText() function and it was behaving oddly and sometimes coming up with the dialog message even if the document contained the search term, almost as if it was searching twice and reaching the end of the document.
I've managed to mitigate this "issue" by using a bool variable to determine if the search has already been performed at least once for the currently loaded document and by Unloading the document before changing the DocumentPath property, so this seems to have resolved it for me.
Thanks for the reply, maybe an option to suppress would be handy but i think in this instance maybe my event handling was sloppy.
Dean.
Hi Dean,
Thanks for the update. We are checking for an alternative solution and we will update the details tomorrow.
Regards,
Shamini
Hi Dean,
If you use PDF Viewer's SearchText option on the client-side for your requirement, many unwanted rendering calls will be triggered because we render the pages to search the text. Hence, we suggest performing the text search on the server-side for listing the document in question using our PDF Base library and using the Web PDF Viewer only for loading the file. If you use PDF Viewer's SearchText option, then the dialog does trigger when it finished searching and there is no way to suppress the dialog.
Help link for searching the text on the server-side:
Regards,
Shamini