08-04-2024, 04:44 PM | #16 | |
Connoisseur
Posts: 86
Karma: 33940
Join Date: May 2010
Device: Opus
|
Quote:
You can also think about how to implement "goto page #". First, you can sum up the # of pages of each spine element until you find the one that contains the page of interest. For those elements, you get both their compressed and uncompressed sizes from the zip headers, so you could use either one. Then you need to uncompress that element and do layout until you reach the "screen" that contains the page boundary. For example, you generate the first "screen" and then know that it consumes bytes 0 through s1-1 of the uncompressed html; then the second "screen" consumes bytes s1 through s2-1, still of the uncompressed html. Relating those to compressed positions is certainly an unnecessary complication; and it is most likely a further distortion from the intuitive notion of page = some amount of content (e.g. a page could compresses well while another does not). Anyway, the mater can be settled easily, I think. Just look at the number of synthetic pages, and the compressed and uncompressed sizes for an ordinary (i.e. that compresses well) epub. |
|
08-04-2024, 05:09 PM | #17 | |
Resident Curmudgeon
Posts: 76,494
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Page numbers wrong in TOC | gingerbeardman | ePub | 7 | 12-08-2021 07:39 AM |
Clara HD Page numbers in wrong spots | walhir | Kobo Reader | 10 | 05-18-2020 09:54 AM |
Page numbers wrong on Kobo!! | cabal2000 | Kobo Reader | 8 | 01-05-2019 10:26 AM |
Kindle 4 NT, wrong time and page numbers | dove_g | Amazon Kindle | 7 | 04-06-2012 09:34 PM |
Calibre getting page numbers wrong in conversion to epub. | WendyH | Conversion | 9 | 09-04-2011 06:29 AM |