2 ms·
I've worked on a ePub parser and renderer and the issues you're describing sound pretty familiar. The three main components of the ePub (aside from the actual
by richeyryan 6y ago
I've worked on a ePub parser and renderer and the issues you're describing sound pretty familiar.
The three main components of the ePub (aside from the actual pages) are the TOC, the spine and the manifest. The manifest basically tells you where everything is, the TOC is the table of contents which can link to various pages and the spine gives you the traversal order.
Some mistakes I've seen are using the TOC to traverse the book. Using the spine to traverse the book but not handling hidden pages properly. Not handling two page spread properly.
So yeah the spec is nuanced and it would be easy to make a reader that worked with a lot of books but then had weird issues on another set of books that aren't particularly different. We ended up writing our own parser because we kept finding issues with the main open source ones.
I recall using this repo (https://github.com/IDPF/epub3-samples https://github.com/IDPF/epub3-samples) to test specific functionality to make sure it was in line with the spec.
- johnchristopher 6y agoThanks for the explanation.