Reputation: 19
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,
Thanks in advance.
Upvotes: 2
Views: 9257
Reputation: 1645
it seems not an easy work, here is my thought.
Instead of using CGContextDrawPDFPage in Quartz2D, you may need to layout the page yourself for getting the CGRect of the text for highlight.
Upvotes: 0
Reputation: 96927
Instead of using UIWebView
, you might want to look into using Quartz 2D's CGPDFDocumentRef
and parsing a CGPDFDictionary
for strings of interest.
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.
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.
Upvotes: 3