A book was written on iPad in the Pages app.
I thought that if Pages has an EPUB export feature, that would be enough. But after finishing the book, I saved it in EPUB and opened it in the reader — the entire layout was completely "broken": the formatting was disrupted, lines and paragraphs shifted, and the structure collapsed.
I know that Pages has options for "flowing layout" and "fixed layout," but neither of them produced an acceptable result.
Currently, I have saved the book in PDF format, and only in this format does the layout look correct: all paragraph styles and formatting that I used in Pages (headings, subheadings, main text, etc.) are preserved.
PDF reads well on iPad, but it is inconvenient on smartphones, so EPUB is needed.
There are no complex tables in the book. There are about a dozen decorative PNGs with transparency that are used only as design elements.
Book Characteristics:
Goal
Create a correct EPUB where the layout does not "break" and the logical structure of the book is preserved.
Prepare the layout for printing the physical book.
The cover and back design are already done.
The only question remains regarding the spine, as its thickness depends on the final page count.