简体   繁体   English

从iPhone应用程序打开PDF

[英]Open PDF from iPhone Application

I am developing an app where I create a PDF in the app and have to open it, so that the user can view it. 我正在开发一个应用程序,我在应用程序中创建PDF并且必须打开它,以便用户可以查看它。 I know that we can use Webview to open any PDF, but I want to open the PDF in the iPhones default PDF viewer(THE ONE WHICH OPENS UP WHEN WE CLICK ANY ATTACHED PDF IN EMAIL) which has share button on right side of the navigation bar and a back button. 我知道我们可以使用Webview打开任何PDF,但我想在iPhone默认PDF查看器中打开PDF(当我们点击任何附着的PDF格式的电子邮件时打开它)在导航右侧有共享按钮酒吧和后退按钮。

The simple answer is use the QuickLook framework and this is what the mail client uses (or close to it). 简单的答案是使用QuickLook框架,这是邮件客户端使用(或接近它)的内容。 It has a pdf viewer and it is really simple to use so I will direct you to the apple docs :) 它有一个pdf查看器,它使用起来非常简单,所以我将引导你到苹果文档:)

http://developer.apple.com/library/ios/#documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/UsingtheQuickLookFramework.html http://developer.apple.com/library/ios/#documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/UsingtheQuickLookFramework.html

There is a sample code in the following link and it will help u 100 %. 以下链接中有一个示例代码,它将帮助您100%。

http://ios.biomsoft.com/2012/02/17/load-a-pdf-file-in-the-iphone-app-smoothly/ http://ios.biomsoft.com/2012/02/17/load-a-pdf-file-in-the-iphone-app-smoothly/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM