xcode 从 iOS 应用程序打开 PDF 文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9481670/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Open PDF file from an iOS Application
提问by Miwi
I need to open some PDF files from my App and need some advices. These files will be on my server and I would open them using a UIWebView.
我需要从我的应用程序中打开一些 PDF 文件并需要一些建议。这些文件将在我的服务器上,我将使用 UIWebView 打开它们。
Do you think it is a good idea or should I do somehow different? Googling I found something about PDF Kit! Is it better or worst? And why?
你认为这是一个好主意还是我应该做一些不同的事情?谷歌搜索我发现了一些关于 PDF Kit 的东西!它是更好还是最坏?为什么?
回答by Bobrovsky
In my experience UIWebView is fine for small files without many images.
根据我的经验 UIWebView 适用于没有很多图像的小文件。
If a PDF contains many pages or large colorful images then UIWebView may be not very fast to open it. And memory consumption might be high.
如果 PDF 包含许多页面或大型彩色图像,则 UIWebView 可能无法快速打开它。而且内存消耗可能很高。
In the latter case you might want to use some third-party component or implement your own class. See Fast and Lean PDF Viewer for iPhone / iPad / iOs - tips and hints?for some useful tips.
在后一种情况下,您可能希望使用某些第三方组件或实现您自己的类。请参阅适用于 iPhone / iPad / iOs 的快速精益 PDF 查看器 - 提示和提示?一些有用的提示。