在iPad或iPhone上阅读PDF内容的方式是什么?如何在ipad/iphone上阅读pdf?
4
A
回答
7
您可以使用Quartz解析PDF文档并提取元数据。 Parsing a PDF
3
有阅读iPhone/iPad上的PDF另一种简单的方法:
取一的UIWebView(名称:pdfView)。
给IBOutlet中连接到它&委托给FilesOwner
在viewDidLoad中/ VIewWillApper/VIewDidApper
[self.pdfView loadRequest:[NSURLRequest requestWithURL: [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"ObjC" ofType:@"pdf"]]]];
ObjC.pdf
应该在资源文件夹
1
使用fastpdfkit: https://github.com/mobfarm/FastPdfKit
0
首先,将内置的pdf文件保存在iPhone模拟器的文档目录中(称为demo.pdf)。然后用下面的代码在viewDidLoad方法ViewController.m文件,不要忘记添加UIWebViewDelegate在ViewController.h文件
-(void) viewDidLoad
{
[super viewDidLoad];
UIWebView theWebView=[[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 460)];
theWebView.delegate=self;
theWebView.scalesPageToFit=YES;
[self.view addSubview:theWebView];
NSArray *paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentDir=[paths objectAtIndex:0];
NSString *fileName=[documentDir stringByAppendingPathComponent:@"demo.pdf"];
NSURL *url=[NSURL fileURLWithPath:fileName];
[theWebView loadRequest:[NSURLRequest requestWithURL:url]];
}
相关问题
- 1. 如何逐行阅读pdf
- 2. Android上的PDF阅读
- 3. 如何在Android中阅读PDF?
- 4. PDF阅读器
- 5. PDF阅读器
- 6. 用Apache阅读PDF PDF盒
- 7. 在iPad中阅读pdf
- 8. pdf在网站阅读
- 9. 在windows phone中阅读PDF
- 10. 在asp.net中阅读pdf
- 11. 写在PDF文件阅读
- 12. pdf阅读标签
- 13. 用iphone阅读PDF
- 14. 阅读PDF文件
- 15. Pdf阅读器Android
- 16. 阅读PDF文件
- 17. 如何阅读R中的pdf文件
- 18. 如何打开PDF并阅读它?
- 19. 如何阅读iPhone中的PDF文件
- 20. 如何阅读PDF文本矩阵
- 21. 如何通过C#阅读pdf文件?
- 22. 如何使用Perl和CAM :: PDF阅读PDF文档属性?
- 23. 阅读PDF使用C#.NET
- 24. PDF阅读器喜欢iBooks
- 25. iframe中的PDF阅读器
- 26. 安装PDF阅读器
- 27. 阅读PDF,字符问题
- 28. 阅读pdf页数与C + +
- 29. 逐行阅读PDF - iTextSharp
- 30. ImageMagick错误:阅读PDF
的可能重复[新手想要创建一个PDF阅读器适用于iPod touch - ?什么是最好的办法] (http://stackoverflow.com/questions/93297/newbie-wants-to-create-a-pdf-reader-for-ipod-touch-whats-the-best-approach) – 2010-07-16 14:46:00