| layout | post |
|---|---|
| title | Text search and Extraction in Blazor PDF Viewer | Syncfusion |
| description | Overview of text search capabilities, UI features, programmatic APIs, events and text extraction in the Syncfusion Blazor PDF Viewer. |
| platform | document-processing |
| control | Text search |
| documentation | ug |
| domainurl |
The Blazor PDF Viewer provides an integrated text search experience that supports both interactive UI search and programmatic searches. Enable the feature by setting EnableTextSearch as needed. To give more low-level information about text, methods like SearchTextAsync can be used.
The text search functionality allows you to retrieve and locate content within PDF documents with case-sensitive or case-insensitive matching, enabling integration with search analytics and downstream processing workflows.
- Text search UI: real‑time search from the toolbar, match‑case option, and search navigation controls.
- Text search programmatic APIs: mirror UI behavior with
SearchTextAsync,SearchNextAsync,SearchPreviousAsync, andCancelTextSearchAsync. - Text search events: respond to
OnTextSearchStart,OnTextSearchHighlight, andOnTextSearchCompletefor UI sync, analytics, and custom overlays.
- Use the toolbar/search panel for typical interactive searches and navigation.
- Use
SearchTextAsync/SearchNextAsync/SearchPreviousAsyncwhen driving search programmatically but keeping behavior consistent with the UI. - Use
OnTextSearchStart,OnTextSearchHighlight, andOnTextSearchCompleteevents when you need to respond to search lifecycle changes for UI updates or logging.