Search PDF Annotations on Android

PSPDFKit for Android supports searching for text contained in PDF annotations, including note comments, replies, and [form fields][forms-guide] (text fields, combo box fields, and list box fields). By default, the standard PSPDFKit for Android search feature will include annotation and form field text, requiring no extra setup.

This feature can be toggled off via the SearchOptions.searchAnnotations property, which is then used to manually call performSearch:

val searchOptions = SearchOptions.Builder()

val results = textSearch.performSearch(query, options)
SearchOptions searchOptions =
    new SearchOptions.Builder()

final List<SearchResult> results = textSearch.performSearch(query, options);

Please check out the text search guide to better familiarize yourself with the text search APIs and learn how you can further customize the search experience.