View Full Version : Sony Reader jumps one page back when supposed to go forward


ckirchho
05-26-2009, 06:13 AM
Hello,

we are producing EPUBs out of DTBOOK XML. In one of our files there is a strange problem with the pagination of the book. There is one particular page, and when one tries to go to the next page from there, the reader opens the previous page. Pressing the next page button (either the one at the right side of the display or the other one) again lets the reader jump forward to the problematic page again.
If you type in the page number of the page AFTER the problematic page, the reader is able to go there. If you then go back one page to the problematic page and press one of the buttons for the next page, the reader jumps to the next page.
I guess you have to let the reader display some of the pages before the problematic page in order to get into the aforementioned circle.

This is what the page numbers say (I begin a few pages before the problematic page):
- in the footer it says: 151-152 of 384; margin shows 152
- in the footer it says: 152-153 of 384; margin shows 153
- in the footer it says: 152-154 of 384; margin shows 153 and 154, the 154 is kind of hidden under the 153 (here it starts to get weird)
- in the footer it says: 152-155 of 384; margin shows 153, the 154 is still overlayed by the 153, and in addition it now shows 155 just 5 lines under the 153

The last one is the problematic page, that will jump to the previous page when you press "next page".

When I enter "156" and jump to the appropriate page, and then press "previous page", I land on the problematic page. But between the page 156 and the problematic page there should be some text. If I press "next page", I land on the page with the missing text, "next page" leads to page 156 again. This is repeatable. "Back" jumps back two pages, "forth" reveals overjumped text, another "forth" lands on page 156.

Page 156 is in a new xhtml file by the way.

In Adobe Digital Editions there are no such problems, except for that in the area where the problematic page is, the margin page number 153 appears after the page number 154. First comes 154, then a couple of lines of text below 153, and even lower 155.

My guess is that somehow the pagination algorithm goes wrong there.

But what might trigger such problems? Does anyone now the cause? Or a cure/solution?

Best regards,

Christian Kirchhoff

gwynevans
05-26-2009, 06:49 AM
Does it happen if you trim the source to the content that makes up pages 151-156, say?

Can you narrow it down enough to produce something that shows the fault & you're happy to upload it?

ckirchho
05-26-2009, 09:51 AM
Yes, it still happens. I cut down the original dtbook xml to something way smaller and attached the result.

Here is my experience:
- opened the e-book in Sony Reader (title is "ALG II Test", opened from the beginning)
- typed "4" and jumped to page for (text starts with heading saying "Kapitel D")
- margin says "4"
- press "next"
- margin on following page says "5" and "6"
- press "next"
- margin on following page says "5", "7" and "6". The "5" and the "6" are at the same position as in the former page, the "7" is between them, so before the "6", which is wrong. This is now the problematic page
- press "next"

Now the first time I did this, the reader didn't jump to the previous page. I first had to go a few pages further and then back, but then I ended in this strange loop.

But let alone the false page numbers in the margins show that something is wrong there. Which is strange somehow, because the dtbook is valid, the resulting xhtml files are valid, and the epubcheck (from Adobe) that the ant script performs in the end doesn't show any errors either.

If somebody would find the cause, that would be very helpful.

Best regards,

Christian

JSWolf
05-26-2009, 10:52 AM
I have not tried your sample on my 505. But I did fix the problem in ADE for Windows.

In the CSS you have the following...
div.Infokasten {
background: url(images/bg_infobox.png) no-repeat left top;
border-top: 1px solid #000;
font-family: "Arial", sans-serif;
font-size: .85em;
margin: 1em 0 1em 1em;
padding: .6em 0 0 .6em;
}

If I delete
background: url(images/bg_infobox.png) no-repeat left top;
from the CSS, it works fine.

Might be a good idea to remove all images from the CSS and put them in the XMTML code instead.

gwynevans
05-26-2009, 11:20 AM
I'm not exactly sure what's triggering it[1], but it's trying to display as a two-column mode. If the ADE window is wide enough, that'll show the two columns, but if it's not, it looks as if the columns are confusing things.

The CSS imports "editura.xpgt", which is involved, but I'm not familiar enough with things to be sure of the details as to how.

JSWolf
05-26-2009, 11:42 AM
I'm not exactly sure what's triggering it[1], but it's trying to display as a two-column mode. If the ADE window is wide enough, that'll show the two columns, but if it's not, it looks as if the columns are confusing things.

The CSS imports "editura.xpgt", which is involved, but I'm not familiar enough with things to be sure of the details as to how.
That makes sense. When I make the ADE window wide enough, it does get the page numbers correct as two columns. But getting rid of the graphic image and the references to it fixes the problem as well in single column.

ckirchho
05-26-2009, 11:57 AM
Thanks very much for these hints.

I use a non-repeating background image in another situation, but there it is applied to a heading. Heading elements most often contain a rather short amount of text and thus do not break over from one page to another.
But those infoboxes that I styled with that particular background image do break over pages. I recognized that the reader displays the background image on every following page at the position defined in the CSS (left top). Because the continuation of the infobox on the new page begins at the top left of the page display, the background image appears there as well. Maybe that causes some problem.

The xpgt file never caused problems so far. For output devices with modifiable display size like ADE it renders the text in more than one column depending on the width of the display.

I will get rid of the background image and realize it in anoher way.

Thanks very much again,

Christian