高亮显示PDF文档iPhone xcode中的文本 [英] HIghlighting the text in PDF document iPhone xcode

查看:128
本文介绍了高亮显示PDF文档iPhone xcode中的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hii朋友,
i我正在使用网页视图开发ae书籍,我正在加载带有PDF文档的网页视图。现在我想开发搜索功能但我并不知道如何实现它。所以我很乐意给我是一个解决方案,

Hii friends, i am developing a e Book using a web view where i am loading the web view with PDF document.Now i want to develop the search functionality but i am not unserstanding how to implement it.So kindly give me a solution,

提前致谢。

推荐答案

而不是使用 UIWebView ,您可能希望使用Quartz 2D的 CGPDFDocumentRef 并解析 CGPDFDictionary 感兴趣的字符串

Instead of using UIWebView, you might want to look into using Quartz 2D's CGPDFDocumentRef and parsing a CGPDFDictionary for strings of interest.

一旦您知道哪些PDF词典元素包含您的文本及其所在位置,您就可以使用其他Quartz 2D例程

Once your know which PDF dictionary elements contain your text and where they are located, you might be able to highlight that text with other Quartz 2D routines.

另一种选择可能是将PDF文档转换为RTF或HTML格式,其中任何一种都可能更容易解析和编辑以添加突出显示。

Another option might be to convert your PDF document to RTF or HTML formats, either of which would probably be easier to parse and edit to add highlighting.

这篇关于高亮显示PDF文档iPhone xcode中的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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