显示来自weburl iphone sdk的pdf [英] Display pdf from the weburl iphone sdk
本文介绍了显示来自weburl iphone sdk的pdf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在开展一个项目,我想在网站上显示pdf,我有pdf的网址,知道如何做到这一点。
另外我想创建网站上的pdf缩略图。
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.
推荐答案
你可以显示pdf在您的设备中。
you could display a pdf in your device.
直接将网址传递给UIWebView。
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];
这篇关于显示来自weburl iphone sdk的pdf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文