Display pdf from the weburl iphone sdk

不打扰是莪最后的温柔 提交于 2019-12-20 05:41:56

问题


I am working on one project I want to display the pdf which is on the website, I have the url of the pdf any idea how I can do it. Also I want to create a thumbnail of the pdf which is on the website.


回答1:


you could display a pdf in your device.

Passing the url to UIWebView directly.

UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 360, 420)];

NSURL *targetURL = [NSURL URLWithString:@"http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIWebView_Class/UIWebView_Class.pdf"];
NSURLRequest *request = [NSURLRequest requestWithURL:targetURL];
[webView loadRequest:request];

[self.view addSubview:webView];
[webView release];


来源:https://stackoverflow.com/questions/5457329/display-pdf-from-the-weburl-iphone-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!