Comment 2 for bug 1427694

Revision history for this message
drunken monkey (remus) wrote :

Thanks for your response!

Just a bit of additional information for anyone else stumbling across this problem:
What puzzled me was that I thought this splitting would occur on paragraph borders, and since the book in question didn't have any long paragraphs, I didn't know what could cause these "large trees".
However, splitting actually occurs across page breaks (as far as I can tell – and it of course makes sense, because otherwise the reader would need to open the other HTML files after all for determining the correct positioning), and there was just an extremely long chapter in the book in question.
So I did the following:

- Based on the above suggestion, I converted with larger split size first:
    ebook-convert book.mobi book.epub --flow-size 1000000
- I then unzipped the .epub to look at the contents:
    unzip book.epub
- Listing the contents, I saw one .html file that was indeed 280 KB large.
- I edited that file, moving the first few paragraphs over to the previous HTML file, moving the file under the 260 KB threshold. (Of course, I also made sure that the previous file ended up under that threshold as well – otherwise, I'd have had to use the next file instead, or juggled around more.)
- I then re-zipped the book which now – apart from a missing page break and one surplus one in the middle of the long chapter – should work fine everywhere. Command (assuming the whole directory contents are the extracted book, nothing else – especially not book.mobi or book.epub):
    zip book.epub *