Organizational Research By

Surprising Reserch Topic

reading text and images from a pdf document in ios

reading text and images from a pdf document in ios  using -'ios,ipad,pdf,uiwebview,catiledlayer'

I'm displaying locally stored pdf in my iPad application. Here's the code:

NSString *path = [[NSBundle mainBundle] pathForResource:@"About Downloads" ofType:@"pdf"];
NSURL *targetURL = [NSURL fileURLWithPath:path];
NSURLRequest *request = [NSURLRequest requestWithURL:targetURL];
[pdfWebView loadRequest:request];

Now, by default, you can't copy text or images from the PDF which is rendered by the UIWebView. Is there a way to let users copy text and/or images out of pdf?

I'm not familiar with CATitledLayer, so i'm just wondering if it can help in this case?

asked Sep 22, 2015 by rajesh
0 votes

Related Hot Questions

2 Answers

0 votes

There's no simple answer to this. PDF's are nested dictionaries composed of more dictionaries & arrays. You'll have to dig into CGPDFDocument. Voyeur is an excellent tool to use while digging around in PDF's. Reader is a good suggested starting point for rendering PDF's.

answered Sep 22, 2015 by vickeykumar66
0 votes

To get at the text in a PDF Document, I use PDF Kitten ( It works quite well, but as the author notes, is incomplete and does not support all font types.

answered Sep 22, 2015 by rajeevr642