View Single Post
Old 08-24-2012, 01:37 PM   #48
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,603
Karma: 5433388
Join Date: Nov 2009
Device: many
Hi DS,

You wrote:

0x003A: 7B0A {
0x003C: 2020 20226465 ... "description" : "PageMap from source by kindlegen",
0x0073: 2020 20227061 ... "pageMap": "(1,c, |i),(3,r,2),(7,r,7),(10,r,11),(12,a,1)"
0x00B1: 7D0A }

0x00B3: 00000028 cover
0x00B7: 000025C0 i
0x00BA: 000028D5 ii
0x00BE: 00002C0F iii
<snip>
-- end pagemap

-- start
<page-map xmlns="http://www.idpf.org/2007/opf">
<page name=" " href="cover.html"/>
<page name="i" href="frontm.html"/>
<page name="ii" href="frontm.html#page_ii"/>
<page name="iii" href="frontm.html#page_iii"/>
<page name="iv" href="frontm.html#page_iv"/>
<page name="v" href="frontm.html#page_v"/>
<page name="vii" href="frontm.html#page_vii"/>
<page name="viii" href="frontm.html#page_viii"/>
<page name="ix" href="frontm.html#page_ix"/>
<page name="x" href="frontm.html#page_x"/>
<page name="xi" href="frontm.html#page_xi"/>
<page name="xii" href="frontm.html#page_xii"/>
<page name="1" href="chapter01.html"/>
<page name="2" href="chapter01.html#page_2"/>
<page name="3" href="chapter01.html#page_3"/>
<page name="4" href="chapter01.html#page_4"/>
<page name="5" href="chapter01.html#page_5"/>



So ...

"pageMap": "(1,c, |i),(3,r,2),(7,r,7),(10,r,11),(12,a,1)"

must in some way code up information in the "preface" pages up to the point where normal page numbering begins.

Do you have a sample that includes appendices or bibliography numbered in a different scheme (maybe A-1 or A2), etc that might show us more?

If not, we can always cook up a few samples that we might be able to use to figure out the exact meaning and construction of:

"pageMap": "(1,c, |i),(3,r,2),(7,r,7),(10,r,11),(12,a,1)"

I am thinking here more along the lines of getting calibre to generate the same information when it creates joint or azw3 mobis.

Also perhaps we need to rename what we call the SRCS offset in the header to be more generic. Perhaps something along the lines of an offset to additional pieces that need not be part of the mobi itself (PAGE, SRCS, and ...?), so perhaps ADDONS offset and count might be a more appropriate way of thinking about this header field in both the Mobi6 and Mobi8 headers.

Thanks again for finding and figuring this out. Patches and changes for Mobi_Unpack are of course welcome! ;-)

Take care,

KevinH
KevinH is offline   Reply With Quote