3

Can anybody tell me if it is necessary to select the text in a PDF file loaded within a UIWebView, or is it selected on its own?

If it's not selected, how can we implement the selection of text within such a PDF?

Brad Larson
  • 170,088
  • 45
  • 397
  • 571
Yama
  • 2,649
  • 3
  • 31
  • 63
  • u can easyly load pdf using CATiledLayer by this u can get more effect on pfd content than webView for that u can get Guide for CALayer on developer.apple and u can got too many tutorial using this keyword CATiledLayer – AJPatel Apr 05 '11 at 12:22

1 Answers1

0

The UIWebView actually draws the PDF pages as images so you don't have access to individual items (textfields, images etc.)

Highlighting isn't by far a trivial task. One solution would be to use the CGPDFScanner to parse the page's stream and figure out how to concatenate the transformations for the text operators (TJ, Tj, Tm, Tc, Tw etc.) in order to get the individual glyph positions. If you succeed in doing that the rest should be pretty straight forward.

Stefan
  • 518
  • 2
  • 6