Hi,
I have a serverblazor project and I want to perform a search on a ejspdfviewerserver control after the DocumentPath property is changed.
I've declared the viewer as such in my razor page
<EjsPdfViewerServer @ref="@PDFViewer" DocumentPath="@strFileArchivePath" ToolbarSettings="@ToolbarSettings" />
So, changing the value of my variable strFileArchivePath works as expected and loads the pdf file.
BUT if i then try to call the getsearchtext method after changing the variable
PDFViewer.GetTextSearch().SearchText(strSearchTerm, false);
It doesn't work, i suspect this is due to code not awaiting the load of the file and therefore it searching before the file has finished loading.
I don't want to use the load method and then the search method, i'd like to subscribe to the "DocumentLoaded" event of the viewer but i cant work out how to do this, can someone provide a simple example please?
Many thanks,
Dean