Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Devices

Notices

Reply
 
Thread Tools Search this Thread
Old 02-09-2011, 10:08 PM   #16
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by user_none View Post
I've added support to the Kindle interface to write it when sending MOBI files to the Kindle. Pages are mapped the same way EPUB page numbers are using 1024 character blocks.
I think it is great that you have been able to implement these pseudo page numbers similar to epub. It's not what Amazon is advertising but it will be invaluable to Kindle users on this forum. Especially for the user who asked for a way to be able to assign x pages of reading to her home schooled child.


Last edited by DoctorOhh; 02-10-2011 at 06:03 AM.
DoctorOhh is offline   Reply With Quote
Old 02-10-2011, 01:41 AM   #17
goaspy
Connoisseur
goaspy can eat soup with a fork.goaspy can eat soup with a fork.goaspy can eat soup with a fork.goaspy can eat soup with a fork.goaspy can eat soup with a fork.goaspy can eat soup with a fork.goaspy can eat soup with a fork.goaspy can eat soup with a fork.goaspy can eat soup with a fork.goaspy can eat soup with a fork.goaspy can eat soup with a fork.
 
goaspy's Avatar
 
Posts: 77
Karma: 9324
Join Date: Feb 2010
Device: Sony PRS-650, Kindle 3
Quote:
Originally Posted by user_none View Post
I've reverse engineered the APNX file format. Full specs are in format_docs/pdb/apnx.txt of the calibre source. I've added support to the Kindle interface to write it when sending MOBI files to the Kindle. Pages are mapped the same way EPUB page numbers are using 1024 character blocks. If all goes well Kovid will merge the change and it will be in the next (0.7.45) release.

Thank you to goaspy for helping with with finding test files for me to look at. Your input was helpful too and make the whole process quicker than it would have been.
Yeah, it was a good day for science You are fast!!
Thanks for your help, I can't wait to give it a go.

Cheers.
goaspy is offline   Reply With Quote
Advert
Old 02-10-2011, 06:25 PM   #18
goaspy
Connoisseur
goaspy can eat soup with a fork.goaspy can eat soup with a fork.goaspy can eat soup with a fork.goaspy can eat soup with a fork.goaspy can eat soup with a fork.goaspy can eat soup with a fork.goaspy can eat soup with a fork.goaspy can eat soup with a fork.goaspy can eat soup with a fork.goaspy can eat soup with a fork.goaspy can eat soup with a fork.
 
goaspy's Avatar
 
Posts: 77
Karma: 9324
Join Date: Feb 2010
Device: Sony PRS-650, Kindle 3
ApnxGen

Here is a proof of concept to entertain you until the next version of Calibre gets out.

Many thanks to user_none for figuring the specs out.

Just get the attachment, extract the content, and run the little proggy (Windows only).


Enter the facts, ISBN (optional), the number of locations (the Kindle will tell you ) and the desired number of pages.

Press 'Generate' then look for a file named unknown.apnx in the same location where you keep the executable.

That's it! Rename the file after your mobi/azw file, and transfer it on the Kindle (or in 'My Kindle Content' folder in documents for Kindle4PC).

Enjoy!
Attached Files
File Type: zip ApnxGen.zip (13.9 KB, 1180 views)

Last edited by goaspy; 02-16-2011 at 04:41 PM.
goaspy is offline   Reply With Quote
Old 02-10-2011, 06:27 PM   #19
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,654
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by goaspy View Post
The ISBN doesn't give you the pages, it is mentioned just so you know that page X from your kindle book is the same with page X from that book.
But it's not the same. I looked as the sample Amazon showed and I think it's like x44 for the Kindle version with the pBook being x52. Close, but not close enough.
JSWolf is online now   Reply With Quote
Old 02-10-2011, 07:08 PM   #20
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
Quote:
Originally Posted by JSWolf View Post
But it's not the same. I looked as the sample Amazon showed and I think it's like x44 for the Kindle version with the pBook being x52. Close, but not close enough.
What sample are you referring to, JSWolf?
DMSmillie is offline   Reply With Quote
Advert
Old 02-10-2011, 07:12 PM   #21
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Quote:
Originally Posted by JSWolf
But it's not the same. I looked as the sample Amazon showed and I think it's like x44 for the Kindle version with the pBook being x52. Close, but not close enough.
The mapping is the same. However, it only maps to pages with actual page number. The copyright, dedication, table of contents pages will be excluded if they are not numbered.

The Girl Who Played with Fire by Stieg Larsson for instance shows a different page total between the Kindle and Print version however every numbered page maps 1 to 1 between the two.
user_none is offline   Reply With Quote
Old 02-10-2011, 11:52 PM   #22
Piper_
~~~~~
Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.
 
Piper_'s Avatar
 
Posts: 761
Karma: 1278391
Join Date: Aug 2010
Location: USA
Device: Kindle 3, Sony 350
Quote:
Originally Posted by goaspy View Post
Here is a proof of concept to entertain you until the next version of Calibre gets out.

Many thanks to user_none for figuring the specs out.

Just get the attachment, extract the content, and run the little proggy (Windows only).

Enter the facts, ISBN (optional), the number of locations (the Kindle will tell you ) and the desired number of pages.

Press 'Generate' then look for a file named unknown.apnx in the same location where you keep the executable.

That's it! Rename the file after you mobi/azw file, and copy it on the kindle.

Enjoy!
Cool!
Thank you, goaspy!
Piper_ is offline   Reply With Quote
Old 02-11-2011, 06:17 AM   #23
silasgreenback
New Leaf Turner
silasgreenback ought to be getting tired of karma fortunes by now.silasgreenback ought to be getting tired of karma fortunes by now.silasgreenback ought to be getting tired of karma fortunes by now.silasgreenback ought to be getting tired of karma fortunes by now.silasgreenback ought to be getting tired of karma fortunes by now.silasgreenback ought to be getting tired of karma fortunes by now.silasgreenback ought to be getting tired of karma fortunes by now.silasgreenback ought to be getting tired of karma fortunes by now.silasgreenback ought to be getting tired of karma fortunes by now.silasgreenback ought to be getting tired of karma fortunes by now.silasgreenback ought to be getting tired of karma fortunes by now.
 
silasgreenback's Avatar
 
Posts: 260
Karma: 1026664
Join Date: Sep 2010
Location: Hadestown
Device: Kobo Glo
Quote:
Originally Posted by goaspy View Post
Here is a proof of concept to entertain you until the next version of Calibre gets out.

Many thanks to user_none for figuring the specs out.

That's it! Rename the file after your mobi/azw file, and transfer it on the Kindle.

Enjoy!
Big thanks to user_none and thanks to you for posting it!

It should be noted that for it to work, the extension .apnx needs to remain at the end of the file.

Having both the page numbers and locations is the bee's knees.
silasgreenback is offline   Reply With Quote
Old 02-11-2011, 01:49 PM   #24
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by user_none View Post
Pages are mapped the same way EPUB page numbers are using 1024 character blocks.
You're aware they are not "EPUB" page numbers, but "Adobe" page numbers, of course, and they are not exactly 1024 character blocks[*]

[*] If I remember correctly, the number of pages per file is computed by dividing the compressed size of the file by 1024. Page boundaries are then distributed evenly in the file.
Jellby is offline   Reply With Quote
Old 02-11-2011, 02:32 PM   #25
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Quote:
Originally Posted by Jellby
You're aware they are not "EPUB" page numbers, but "Adobe" page numbers, of course, and they are not exactly 1024 character blocks
Nope and nope. EPUB is not my area of expertise. I wasn't able to find a spec for computing page numbers so I went from memory about how I thought it worked.

I'm using 1024 blocks of uncompressed text. Since it's an arbitrary calculation it can always be tweaked. I'll look over the ebook docs on Adobe's website and see about getting it working using the same calculation.

Last edited by user_none; 02-11-2011 at 02:34 PM.
user_none is offline   Reply With Quote
Old 02-11-2011, 02:34 PM   #26
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You wont find it easy to use the same calculation as the compression algorithms for MOBI and EPUB are different.
kovidgoyal is offline   Reply With Quote
Old 02-11-2011, 02:55 PM   #27
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Last time I went to check, it seemed the Adobe document was offline. Also, because the pages are computed from the compressed size, it gives a different number if you change the zip compression level when creating the epub

I found a description here.

Since the Adobe page numbers are rather arbitrary and unpredictable, I would advise using any "reasonable" way to computing pseudo-page numbers you can think of, instead trying to replicate Adobe's.

Last edited by Jellby; 02-11-2011 at 02:58 PM.
Jellby is offline   Reply With Quote
Old 02-11-2011, 03:38 PM   #28
Piper_
~~~~~
Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.
 
Piper_'s Avatar
 
Posts: 761
Karma: 1278391
Join Date: Aug 2010
Location: USA
Device: Kindle 3, Sony 350
Quote:
Originally Posted by Jellby View Post
I would advise using any "reasonable" way to computing pseudo-page numbers you can think of, instead trying to replicate Adobe's.

What are the issues preventing a count of presented text only - skipping the source?
Piper_ is offline   Reply With Quote
Old 02-11-2011, 04:57 PM   #29
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Quote:
Originally Posted by Piper_ View Post
What are the issues preventing a count of presented text only
That would require the entire document to be uncompressed. This takes time and processing power. I'm sure this is why Adobe is using the compressed size. It's easily accessible.

MOBI has a field that stores the uncompressed size in it's header. It's easy and quick to accesss.

What I think I'm going to do is count the number of characters in an average paperback page. Then I'll tweak the 1024 number to match the count minus the average markup per page.
user_none is offline   Reply With Quote
Old 02-11-2011, 05:27 PM   #30
Piper_
~~~~~
Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.Piper_ ought to be getting tired of karma fortunes by now.
 
Piper_'s Avatar
 
Posts: 761
Karma: 1278391
Join Date: Aug 2010
Location: USA
Device: Kindle 3, Sony 350
Thanks, User.

Either way, counting the source code in these larger chunks is going to be a lot better for most people than restraining them to 128 byte markers.

It's like aiming for the right foot rather than the right inch. More meaningful to humans and, best of all, gives cushion for bumps in the road.

I long for a day we can have a standard tracking method for all ebook formats.
...and the world to be filled with rainbows and puppy breath...
Piper_ is offline   Reply With Quote
Reply

Tags
apnx, page numbers

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Firmware Update Kindle adds Page Numbers (and more) koland Amazon Kindle 304 07-02-2011 03:54 AM
Kindle adds Page Numbers (and more) koland News 53 03-03-2011 04:30 PM
Is there a hack for displaying page numbers rather than location numbers? nesler Kindle Developer's Corner 16 02-15-2011 12:00 AM
Epub to Kindle and page numbers apropos Calibre 11 12-09-2010 01:42 PM
Page numbers in iphone vs Real Kindle palex481 Amazon Kindle 26 03-16-2009 05:28 PM


All times are GMT -4. The time now is 01:15 PM.


MobileRead.com is a privately owned, operated and funded community.