[英]Display pdf from the weburl iphone sdk
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. 我正在研究一个项目,我想在网站上显示pdf,我有pdf的网址,我知道如何做到这一点。 Also I want to create a thumbnail of the pdf which is on the website.
另外,我想创建一个网站上的pdf缩略图。
you could display a pdf in your device. 您可以在设备中显示pdf。
Passing the url to UIWebView directly. 直接将url传递给UIWebView。
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];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.