问题
I have read that iPad supports .epub format. So are there any API's which makes it easy to read and display .epub format files?
Thanks
回答1:
epub is simply a zipped up collection of xhtml files and metadata (indicies, publisher, author details etc) Epub specs
So all you need to do is unzip the file (can be done by renaming to a .zip extension) and then read the XHTML files in a browser. There will be a .opf file that lists all the files that are in the zip
This assumes that the epub file is not DRM protected if so then you cannot read it except through the program that the DRM is specified to use (usually Adobe Digital Editions on a computer - or iBooks on an iPad) Breaking this encryption is not allowed by DCMA or other laws in many countries.
回答2:
You dont need an API to display the epub, as said above it is simply a zipped collection of files and folders.
You need a way to unzip, find the files and simply display it in a UIWebView.
If you want page turning and pagination that is a totally different beast
来源:https://stackoverflow.com/questions/3359758/apis-for-supporting-epub-format