user1120008
user1120008

Reputation: 1015

iOS cannot select/highlight text in PDF

I cannot select/highlight text in my PDF reader (when you press and hold text). I used the following to open/read PDF documents

http://developer.apple.com/library/ios/#samplecode/ZoomingPDFViewer/Listings/Classes_PDFScrollView_m.html#//apple_ref/doc/uid/DTS40010281-Classes_PDFScrollView_m-DontLinkElementID_4

Upvotes: 4

Views: 1609

Answers (1)

steipete
steipete

Reputation: 7641

Actually, with iOS5, Apple added support for text selection in UIWebView.

Unfortunately, there's no API for this, and their support is rather clunky and slow. And embedding UIWebView's into your app is a rather ugly solution. (and you can hardly control the UI)

You might wanna check out 3rd party iOS frameworks for that feature. https://stackoverflow.com/questions/3801358/pdf-parsing-library-for-ios

I worked the better part of year to roll my own PDF parser that calculates the glyphs to get text selection. (it's commercial, google for PSPDFKit)

Upvotes: 1

Related Questions