---
title: "Generate PDF Search Previews on iOS | Nutrient SDK"
canonical_url: "https://www.nutrient.io/guides/ios/search/indexed-full-text-search/customize-results/"
md_url: "https://www.nutrient.io/guides/ios/search/indexed-full-text-search/customize-results.md"
last_updated: "2026-06-08T09:14:14.417Z"
description: "Learn how to generate PDF search previews on iOS using Nutrient iOS SDK. Improve search results with context snippets for enhanced user experience."
---

# Generate PDF Search Previews on iOS

[`PDFLibrary`](https://www.nutrient.io/api/ios/documentation/pspdfkit/pdflibrary) can also generate a small snippet of text around each match it finds. When calling [`documentUIDs(matching:options:completionHandler:previewTextHandler:)`](https://www.nutrient.io/api/ios/documentation/pspdfkit/pdflibrary/documentuids(matching:options:completionhandler:previewtexthandler:)), if the `previewTextHandler` parameter is not `nil`, [`PDFLibrary`](https://www.nutrient.io/api/ios/documentation/pspdfkit/pdflibrary) will also generate previews. Note that preview generation will have a performance impact, as additional information needs to be extracted from the database. [`PDFDocumentPickerController`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfdocumentpickercontroller) leverages preview generation when displaying results, as shown below.![Preview example](@/assets/guides/ios/features/indexed-full-text-search/ios-document-picker-controller.png)
---

## Related pages

- [Adding a Custom SQLite Library for PDF Search on iOS](/guides/ios/miscellaneous/custom-sqlite-library.md)
- [Custom Tokenizers for PDF Search on iOS](/guides/ios/memory-and-storage/using-custom-tokenizers.md)
- [PDF Search Matching Options on iOS](/guides/ios/search/indexed-full-text-search/matching-options.md)
- [Index and Search PDFs Using iOS Spotlight](/guides/ios/search/indexed-full-text-search/spotlight-indexing.md)
- [Indexing PDF Documents on iOS](/guides/ios/features/indexed-full-text-search.md)
- [Encrypt the PDF Search Database on iOS](/guides/ios/security/encryption-in-pdflibrary.md)

