1

I have a fixed-layout EPUB. Each page is a PNG. The <manifest> is structured like:

<item id="page_1" href="page_1.xhtml" media-type="application/xhtml+xml" />
<item id="page_2" href="page_2.xhtml" media-type="application/xhtml+xml" />
<item id="page_3" href="page_3.xhtml" media-type="application/xhtml+xml" />

etc...

<item id="img-page_1" href="pages/page_1.png" media-type="image/png" />
<item id="img-page_2" href="pages/page_2.png" media-type="image/png" />
<item id="img-page_3" href="pages/page_3.png" media-type="image/png" />

etc...

and in the <spine> like:

<itemref idref="page_1"/>
<itemref idref="page_2"/>
<itemref idref="page_3"/>

etc...

and in each page's xhtml file, the PNG is linked like:

<img src="pages/page_63.png" alt="Page 63"/>

But I'm seeing strange behavior when I unzip the EPUB and replace one of the PNG images (for page 63) in the /pages folder. All I'm doing is changing the actual PNG file for page 63 in /pages. But upon rezipping into an EPUB and opening the file, the page order changes. Now, the new page 63 comes after page 50, and the old page 63 is still there on page 63, even though I deleted the old PNG file from /pages and it's nowhere to be found in there.

I'm totally stumped. Why is this happening? Everything in the <manifest> and <spine> appears in the correct order. There are no duplicate PNG files in /pages. I'm sure of this. So how can the zip even access the old page 63 when I deleted it from the /pages directory? And why is the new page 63 coming after page 50, when the <spine> lists the pages in the correct order?

larry
  • 11
  • 1

0 Answers0