After two days trying to read annotations from a PDF using Quartz, I\'ve managed to do it and posted my code.
Now I\'d like to do the same for another frequently as
So now in iOS 11 we have PDFKit with which searching text is a breeze
if #available(iOS 11.0, *) {
let pdfDocument = PDFDocument(url: fileUrl)!
let allText = pdfDocument.string /// Gets all text in pdf separated by /n
let s: PDFSelection = pdfDocument.findString("Hello", withOptions: [])
let sWithFormatting = s!.first!.attributedString
}