The Syncfusion  Flutter PDF Viewer allows you to view PDF documents seamlessly and efficiently. When working with PDF documents, you’ll often need to search for text. In this blog, you will learn how to create a custom search toolbar and perform text search in a PDF document using the Syncfusion Flutter PDF Viewer.

Configuring the Flutter PDF Viewer widget

Please see our  Flutter PDF Viewer Getting Started documentation to create a Flutter application and configure the Syncfusion Flutter PDF Viewer (SfPdfViewer) widget in it.

Create custom search toolbar and perform text search

Step 1: Create a SearchToolbar widget class to display the toolbar items for search operations and a typedef for the onTap callback. The SearchToolbar widget class has the following properties:

  • controller—An object used to control the SfPdfViewer.
  • onTap—Called when we select or tap on any search toolbar item.
  • showTooltip—Indicates whether to display the tooltip for the search toolbar items or not.

#flutter #mobile #pdf viewer #android #ios #pdf viewer

How to Perform Text Search in a PDF Document Using Flutter PDF Viewer
3.50 GEEK