Thread: Prepagination
View Single Post
Old 01-06-2009, 11:29 PM   #17
ees
Member
ees began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jan 2009
Device: none
Quote:
Originally Posted by kovidgoyal View Post
Look at the media.xml file on your device. It contains the prepagination information (hex encoded IIRC). LRF is a (partially) reflowable format. What the pre pagination does is tell the reader how many screens of text are there at a particular font size and where in the file each screen starts and ends. So to duplicate that, you have to layout the text on an in-memory screen exactly as the reader would. If you are a little off, that will result in missing lines of text, as you see when you replace the fonts on the reader with others that have different metrics and then try to use a pre paginated book
Thanks for the explanation, it's making much more sense.

I did look at the media.xml file, and I see the pagination information (likely Base64 encoded).

It's not immediately clear to me how to deduce Sony's precise rendering algorithm, short of a relatively brute-force approach of disassembly the relevant Sony DLLs. That might be a bit more than I can sign up for...at least for now.

Thanks again!
- e
ees is offline   Reply With Quote