I've been trying to learn some details of amazon's apnx format and the least difficult for me to follow description I've found is calbre's format_docs/pdb/apnx.txt, but I think that has not kept up with the source code and some of it does not reflect what can be gleaned from examination of an apnx file and how a book from amazon behaves.
Quote:
Page Mapping Header
-------------------
The page mapping header is a string enclosed in {} containing key, value pairs.
content comments
asin The ISBN 10 for the paper book the pages correspond to
pageMap Three value tuple. Looks like: "(N,N,N)"
1) Number of bytes after header that starts the page numbering sequence
2) unknown
3) unknown
|
I think the tuple descriptions should be something like:
A pbook that has X leafs has 2X page numbers, which may be Indo-Arabic numerals, Roman numerals, or something else. There is a value in the Page List section and the end of the apnx file that is the byte of the book HTML that is the start of the page for each labeled page in the book.
1) The first labeled page of the sequence of pages this tuple describes.
2) Page number type, a: Indo-Arabic numeral, r: Roman numeral, c: something else
3) Value of page number for the first page of this sequence.
A tuple with page type "c" can only describe 1 page. The other types get incremented by 1 until the first page of the next tuple.