Generate PDF Search Previews on iOS
PDFLibrary can also generate a small snippet of text around each match it finds. When calling
documentUIDs(matching:options:completionHandler:previewTextHandler:), if the
previewTextHandler parameter is not
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 leverages preview generation when displaying results, as shown below.