PDF search matching options on Android
PdfLibrary offers advanced matching options. You pass these options with a QueryOptions object in the search() method.
The following options are available:
| Name | Type | Description |
|---|---|---|
generateTextPreviews | Boolean | Retrieves preview snippets of text when searching and delivers them in the onSearchPreviewsGenerated() callback. |
maximumResultsTotal | int | The maximum amount of search results for the total of all documents. |
maximumResultsPerDocument | int | The maximum amount of search results per page. |
matchExactWords | Boolean | Only matches exact words. For example, “something” would not match “some.” |
matchExactPhrases | Boolean | Only matches exact phrases. For example, “this is a test” would not match “this is a quick test.” |
Advanced configuration
You can configure PdfLibrary to match your needs. The following properties on PdfLibrary are available:
| Property | Type | Default | Description |
|---|---|---|---|
saveReversedPageText | Boolean | true | Indicates if the reversed text of a PDF document should be saved. This increases the size of the cache by about two times, but it allows for ends-with searches. |