Quote:
Originally Posted by macayer
What about if we want to get the data of a pdf from a uiwebview?
|
Can't be done. You need to use Quartz for this. Search for CGPDFDocumentCreateWithURL and CGPDFScannerRef. You'll find examples of parsing PDF files to get the text.
BUT, be warned, parsing PDFs for text is painful. There are strings and string arrays in PDFs, but that doesn't guarantee you can parse a PDF. Some PDFs don't have text at all but use custom "glyphs" to represent characters.
Additionally, you have to handle figuring out if there is a space or not in a string array. You may end up parsing through the array and not finding any spaces. Then you have to look at the distance between characters to figure out where the spaces are.