From: http://ideveloperworld.blogspot.in/2011/02/epub-reader.html
(Reference: http://stackoverflow.com/questions/1388467/reading-epub-format
http://stackoverflow.com/questions/9358311/pagination-and-images-in-epub-books?rq=1
)
(Build a digital book with EPUB: http://www.ibm.com/developerworks/xml/tutorials/x-epubtut/index.html)
1) create a view with a UIWebView
2) download the EPUB file
3) unzip it to a subdirectory in your app's documents folder .
4) parse the XML file at META-INF/container.xml (if this file doesn't exist the EPUB is invalid) using TBXML, linked above
5) In this XML, find the first "rootfile" with media-type application/oebps-package+xml. This is the OPF file for the book.
6) parse the OPF file (also XML)
7) now you need to know what the first chapter of the book is.
a) each <item> in the <manifest> element has an id and an href. Store these in an NSDictionary where the key is the id and the object is the href.
b) Look at the first <itemref> in the <spine>. It has an idref attribute which corresponds to one of the ids in (a). Look up that id in the NSDictionary and you'll get an href.
8) create an NSURL using fileURLWithPath:, where the path is the full path from (7c). Load this request using the UIWebView you created in (1).