显示来自 weburl iphone sdk 的 pdf [英] Display pdf from the weburl iphone sdk

查看:26
本文介绍了显示来自 weburl iphone sdk 的 pdf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一个项目,我想在网站上显示 pdf,我知道 pdf 的 url 知道我该怎么做.我还想创建网站上 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.

直接将 url 传递给 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆