-
Notifications
You must be signed in to change notification settings - Fork 1
Working with Text Search in .NET MAUI PDF Viewer #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,24 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
// Load the PDF document from embedded resources. | ||
Stream? stream = typeof(MainPage).GetTypeInfo().Assembly.GetManifestResourceStream("TextSearch.Assets.PDF_Succinctly.pdf"); | ||
PdfViewer.LoadDocument(stream!); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
// Searches for the specified text asynchronously and stores the result. | ||
async void SearchText(string text) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may need to handle cancelling text search.
https://help.syncfusion.com/maui/pdf-viewer/text-search#cancelling-search-progress
// Searches for the specified text asynchronously and stores the result. | ||
async void SearchText(string text) | ||
{ | ||
SearchResult = await PdfViewer.SearchTextAsync(text); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- We may need to show the search progress to the users. Did we handle it? https://help.syncfusion.com/maui/pdf-viewer/text-search#text-search-progress
- We may need to show the search completion to the users. Did we use any "Search completed', "no matches found" kind of things?
An example added for Working with Text Search in .NET MAUI PDF Viewer