ios PDF 查看器 iPad 应用程序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4949809/
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
PDF Viewer iPad App
提问by wajiw
I'm looking to develop a customPDF viewer for an iPad, which has features like:
我正在寻找为 iPad开发自定义PDF 查看器,它具有以下功能:
- bookmarks
- search
- deep linking
- zoom
- jump to specific page
- 书签
- 搜索
- 深层链接
- 飞涨
- 跳转到特定页面
Does anyone know a code solution similar to this? I'm currently looking at Ghostscriptbut am having a problem finding other options.
有谁知道与此类似的代码解决方案?我目前正在查看Ghostscript,但在寻找其他选项时遇到问题。
采纳答案by TomSwift
I've developed a custom reader like this which I've used for a handful of projects for clients. Search & Highlight was by far the most difficult, followed by text selection. Keeping memory usage low for large PDF's is tricky too.
我开发了一个像这样的自定义阅读器,我已经将它用于一些客户的项目。搜索和突出显示是迄今为止最困难的,其次是文本选择。为大型 PDF 保持较低的内存使用率也很棘手。
I cant share my source. But here's someone who has a free library that looks promising:
我不能分享我的来源。但这里有人拥有一个看起来很有前途的免费图书馆:
https://github.com/mobfarm/FastPdfKit
https://github.com/mobfarm/FastPdfKit
(it doesn't look as if the source code is available?)
(看起来好像没有源代码?)
回答by Joshua J. McKinnon
For a simple and effective PDF viewer, you can now (iOS 4.0+) use the QuickLook framework:
对于简单有效的 PDF 查看器,您现在可以(iOS 4.0+)使用 QuickLook 框架:
QLPreviewController *previewController = [[QLPreviewController alloc] init];
previewController.dataSource = self;
previewController.delegate = self;
previewController.currentPreviewItemIndex = indexPath.row;
[self presentModalViewController:previewController animated:YES];
[previewController release];
You need to link against QuickLook.framework
and #include <QuickLook/QuickLook.h>
您需要链接到QuickLook.framework
和#include <QuickLook/QuickLook.h>
For anything more complex, just grab the excellent PSPDFKit.
对于任何更复杂的事情,只需获取优秀的PSPDFKit。
回答by lindon fox
Here is a nice example of a pdf readeron github. It does not do the advanced things (like text search), but it might be good as a starting place. Seems to do OK with large pdfs, so maybethe performance is not too bad.
这是github上pdf阅读器的一个很好的例子。它不做高级的事情(比如文本搜索),但它可能是一个很好的起点。似乎可以处理大型 pdf,所以性能可能还不错。
回答by doozMen
There is a payed option named http://pspdfkit.com/
有一个名为http://pspdfkit.com/的付费选项
I have been looking at the example and it seams to work the way I was hoping to find some code example
我一直在看这个例子,它的工作方式与我希望找到一些代码示例的方式一样
回答by Dwight Kelly
You could port Xpdf or the forked Poppler to iOS and use their rendering capabilities as well as retrieving information such as bookmarks and URI links from the PDF for use in your application.
您可以将 Xpdf 或分叉的 Poppler 移植到 iOS,并使用它们的渲染功能以及从 PDF 中检索诸如书签和 URI 链接之类的信息,以便在您的应用程序中使用。
回答by MusiGenesis
http://www.labnol.org/software/ipad-pdf-reader-apps/13807/
http://www.labnol.org/software/ipad-pdf-reader-apps/13807/
Update:I can't find any PDF component/library for iOS, which doesn't surprise me. So here's a crazy alternative (so crazy it just might work): Write your app in C#/.Net using MonoTouch, and incorporate the free .Net library iTextSharp. I have no idea if this would work or not.
更新:我找不到任何适用于 iOS 的 PDF 组件/库,这并不让我感到惊讶。所以这里有一个疯狂的替代方案(太疯狂了,它可能会起作用):使用MonoTouch在 C#/.Net 中编写您的应用程序,并结合免费的 .Net 库iTextSharp。我不知道这是否有效。
Another idea might be to incorporate a web service (running on a server somewhere) that will convert your PDF into HTML for you. Your server component can be written in any language, which expands your PDF-component options considerably. And the things you want to do in your bullet points would be a lot easier to implement yourself with HTML.
另一个想法可能是合并一个网络服务(在某处的服务器上运行),它将您的 PDF 转换为 HTML。您的服务器组件可以用任何语言编写,这大大扩展了您的 PDF 组件选项。并且您想在要点中做的事情用 HTML 自己实现会容易得多。