View Full Version : How are the page numbers/number of pages defined?


kennyc
09-25-2009, 10:28 AM
This has probably been asked before, but how are the page numbers and number of pages determined in EPUB. Is it in relation to the Printed Book or completely independent.

They do not change when I change font size so I presume it is "built in" to the document, but I'm curious how they are initially determined whether just by the creator of the particular book or whether there is an attempt to related it to the physical printed book?

HarryT
09-25-2009, 10:33 AM
They appear to be 1k blocks in the book. Eg, a 300k book will have (about) 300 pages. A new page also begins at every hard page break.

wallcraft
09-25-2009, 10:37 AM
Page numbers are Adobe-specific, they are not part of the ePub standard.

By default in ADE they are every 1024 unicode characters, allowing for explicit page breaks. It is possible to explicitly define them in the ePub, and this is sometimes done (e.g. to refer to the original paper book's page numbers). See observation about ADE page numbers (http://www.mobileread.com/forums/showthread.php?t=53195).

tompe
09-25-2009, 11:26 AM
Page numbers are Adobe-specific, they are not part of the ePub standard.

By default in ADE they are every 1024 unicode characters, allowing for explicit page breaks. It is possible to explicitly define them in the ePub, and this is sometimes done (e.g. to refer to the original paper book's page numbers). See observation about ADE page numbers (http://www.mobileread.com/forums/showthread.php?t=53195).

Is this including the markup or excluding it?

kennyc
09-25-2009, 12:14 PM
They appear to be 1k blocks in the book. Eg, a 300k book will have (about) 300 pages. A new page also begins at every hard page break.

Page numbers are Adobe-specific, they are not part of the ePub standard.

By default in ADE they are every 1024 unicode characters, allowing for explicit page breaks. It is possible to explicitly define them in the ePub, and this is sometimes done (e.g. to refer to the original paper book's page numbers). See observation about ADE page numbers (http://www.mobileread.com/forums/showthread.php?t=53195).


Thanks guys!

Abecedary
09-27-2009, 09:41 AM
Is this including the markup or excluding it?

It seems to include the markup. I went through and cleaned up a calibre converted book I had (calibre was basically doubling up on the span tags on every paragraph, one of which was totally unnecessary) and my total page count decreased when I was done.

Also, if I'm not mistaken, it's 1024 compressed characters. I believe you'll get different pagination depending on the zip compression level you use.

HarryT
09-27-2009, 10:24 AM
It makes sense that it's compressed. A 300k text-only ePub file does seem to have about 300 pages.

The page count also appears to exclude images. Adding images to an ePub file dramatically increase the file size, but does not increase the page count.

Jellby
09-27-2009, 11:19 AM
The page count also appears to exclude images. Adding images to an ePub file dramatically increase the file size, but does not increase the page count.

Probably because images are not included in the text flow, but are just referenced, the 1024 count would include the "<img src="..." alt="...">", though.

HarryT
09-27-2009, 11:23 AM
Probably because images are not included in the text flow, but are just referenced, the 1024 count would include the "<img src="..." alt="...">", though.

Yes, that's what I figure, too.