I have just started using calibre, (many thanks to the developer/s), and I am converting text files, (with markdown), to produce epub output for a Sony reader. This works very well although I have a query. I have just converted a simple piece of text which is 96 lines long and expected to get a single page of output. This seems to happen as there is only one HTML content file in the generated epub. However, when using the calibre book viewer, (and my reader), it says that there are 7 pages in the document instead of 1. So my query is: what determines the page length on readers and in the calibre veiwer?

So my query is: what determines the page length on readers and in the calibre veiwer?

I have seen a post by Kovid regarding this calculation for the Calibre viewer. IIRC, he said it is a count of characters in the file divided by some arbitrarily determined number that roughly corresponds to the number of characters on a typical page. It's not really a "page" as EPUBs aren't page oriented, but it's useful as a rough marker.

Thanks for the quick response - it's nice to know that it's not something that I've selected during the conversion, (or forgotten to specify). My reader is a bit annoying in that it displays this page number on the right-hand side, so I have to allow a slightly bigger margin to avoid obscuring text.

My reader is a bit annoying in that it displays this page number on the right-hand side, so I have to allow a slightly bigger margin to avoid obscuring text.

If it wasn't clear - I don't think the page number displayed by your reader has anything to do with the "page" number calculated by Calibre's viewer.

FYI, Calibre's viewer puts a last-read page number (or something equivalent) into a bookmark file that is inserted into the epub when you read it in Calibre's viewer. However, I don't believe any e-readers look at that information or use it in any way.

Thanks again, your reply was clear but mine was a bit ambiguous. I meant that my Sony reader displays its own calculated page number, (nothing to do with calibre), with no option to switch it off: a trivial annoyance in an otherwise excellent reader - and easily dealt with by calibre's conversion to epub.

I had noticed the calibre bookmark in the epub files and my reader simply ignores it, so I leave it in the epub as it's handy for use in calibre's viewer.

Thanks for the quick response - it's nice to know that it's not something that I've selected during the conversion, (or forgotten to specify). My reader is a bit annoying in that it displays this page number on the right-hand side, so I have to allow a slightly bigger margin to avoid obscuring text.

That sounds like the ADE generated page number I see on my Pocket EZ

I did 2 things in Calibre:
I make the right margin 16pt (allows for 3 digits when used with setting below) (I also shrank the left margin to 2pt, since i count the bezel of my reader as a fixed margin

and I set the base font to 16 or larger, then the number appears small in respect to the display text when zoomed (2,3 or 4) on the reader