![]() |
#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. |
|
![]() |
![]() |
![]() |
#17 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,540
Karma: 134254544
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Page numbers wrong in TOC | gingerbeardman | ePub | 7 | 12-08-2021 06:39 AM |
Clara HD Page numbers in wrong spots | walhir | Kobo Reader | 10 | 05-18-2020 08:54 AM |
Page numbers wrong on Kobo!! | cabal2000 | Kobo Reader | 8 | 01-05-2019 09:26 AM |
Kindle 4 NT, wrong time and page numbers | dove_g | Amazon Kindle | 7 | 04-06-2012 08:34 PM |
Calibre getting page numbers wrong in conversion to epub. | WendyH | Conversion | 9 | 09-04-2011 05:29 AM |