从iOS中的pdf文档中读取文本和图像
我在我的iPad应用程序中显示本地存储的pdf。这是代码:
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];
现在,默认情况下,您无法复制由PDF呈现的PDF中的文本或图像UIWebView的。有没有办法让用户从pdf中复制文本和/或图像?
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?
我不熟悉CATitledLayer,所以我只是想知道在这种情况下它是否有帮助吗?
I'm not familiar with CATitledLayer, so i'm just wondering if it can help in this case?
对此没有简单的答案。 PDF是由更多字典组成的嵌套字典。阵列。您将不得不深入了解 CGPDFDocument 一>。 偷窥者是一个很好的工具,可以在PDF中进行挖掘。 Reader 是渲染PDF的一个很好的建议起点。
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.