Divide HTML into pages with no lines cut in half

Does anyone know how iBooks splits HTML files in an EPUB book into multiple pages so that no line of text is cut in half?

I managed to display e-books in UIWebView , but often the lines of text are obtained in half from above and / or from below.

(I would post an image to show what I mean, but I have too few reputation points. But I hope you get this idea.)

+4
source share
1 answer

I am not an expert on iBooks, but I believe that it modifies the UIWebView , so only the content of the page is displayed in the view. You can try the following:

  • Download full HTML without displaying it
  • set the text selection from the beginning of the top line to the end of the last line in the view
  • then crop the contents at the end of the selection
0
source