IF the PDF contains text that is weirdly formatted or contained in images you are without luck, else there are several ObjC libraries available (on github)
they all wrap the CoreGraphics CDPDF* Functions
this isn't that easy and cant be answered in a one-liner but the basic approach is:
- get a CGPDFDocument
- get each PDFPage
- get the CGPDFDictionary for each page and parse it. it will give you ALL objects in the pdf page
- foreach string you encounter, call CGPDFStringCopy and append it to a mutableString that serves as your buffer
- the buffer is the doc's text