iPhone中是否可以获取页码和行号
是否可以从iPhone sdk中的doc/rtf/pdf中获取特定文本的页码和行号?
QLPreviewController 或 UIDocumentInteractionController 有什么帮助吗?
编辑:
我正在尝试创建类似 iAnnotate、Sente 的东西。用户将能够选择一些文本并可以为所选文本添加注释的应用程序。
我已经浏览过 fastpdfkit api,这似乎是唯一可以提供一些帮助的 api。
你们能引导我走向正确的方向吗?
Is it possible to get the page number and line number of particular text from doc/rtf/pdf in iPhone sdk?
Can QLPreviewController or UIDocumentInteractionController be of any help?
EDIT:
I am trying to create something like iAnnotate,Sente. Application where in user will be able to select some text and can add comments for selected text.
I have gone through the fastpdfkit api's which seems the only api which can be of some help.
Can you guys guide me in the right direction.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
https://github.com/brow/leaves
点击此链接,它将对您的 PDF 阅读器有所帮助你可以在那里看到我是如何做总页和当前页的。
https://github.com/brow/leaves
Go with this link, it will help you for PDF reader and you can see there how I am doing total page and current page.
如果您正在考虑使用 PDF、RTF 和 DOC 执行此操作,那么最好以不同的方式进行处理,因为它们都是非常不同的格式。
相反,如果您考虑将注释附加到页面的某个区域而不是特定的文本选择,那么您需要了解的有关文档的只是您正在查看哪个页面。一个更容易的任务。然后,您让用户“拖出”该页面某个区域的评论框。把它们想象成便利贴。
通过这种方式,您可以向图像和文本添加注释,并且它允许更灵活的系统将来支持其他文件格式。
我意识到这不是我对问题的直接回答,但认为它足够相关,可以发布。
If you're looking at doing this with PDF, RTF and DOC it might be best to approach it in a different way as they are all very different formats.
Instead - if you consider attaching comments to an area of the page as opposed to a specific text selection then all you need to know about the document is which page you're looking at. A much easier task. Then you get the user to 'drag out' a comments box for an area of that page. Think of them more like sticky-notes.
This way you can add comments to images as well as text and it allows a much more flexible system for support of other file formats in the future.
I realise this isn't I direct answer to the question, but thought it relevant enough to post.