You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are adding a feature to our book reader for our Android application that will remember the last page the user was at in the book and the next time we launch the same book in the book reader, we will set the book at that page. We are using the book reader bookmarks mechanism for this.
What we are observing is that when we open the book at another location than the default first page of the book, the number of pages for that particular chapter is always close to double the expected number of pages.
We traced this in reflowable_view.js, in the updatePagination() method, this call:
_$epubHtml[0].scrollHeight
The value returned for scrollHeight is always wrong at launch, it always larger than what is expected. The result of that is that number of columns returned (which is the number of pages) is always larger, so we end up with a bunch of blank pages at the end of the chapter. Once the book is loaded and we switch chapter and then go back to that chapter, the number of pages returned is corrected and we don't have blank pages any longer.
Please let us know if you require more details.
Thanks!
The text was updated successfully, but these errors were encountered:
@danielweck It seems so far that we observe this behaviour with EPUBs that load CSS font-faces. We will try to find books that don't have CSS font-faces to confirm.
rkwright
changed the title
[Android Weview] Reflowable view: Wrong scrollHeight returned when launching the reader
[Android Webview] Reflowable view: Wrong scrollHeight returned when launching the reader
May 13, 2016
We are adding a feature to our book reader for our Android application that will remember the last page the user was at in the book and the next time we launch the same book in the book reader, we will set the book at that page. We are using the book reader bookmarks mechanism for this.
What we are observing is that when we open the book at another location than the default first page of the book, the number of pages for that particular chapter is always close to double the expected number of pages.
We traced this in reflowable_view.js, in the updatePagination() method, this call:
_$epubHtml[0].scrollHeight
The value returned for scrollHeight is always wrong at launch, it always larger than what is expected. The result of that is that number of columns returned (which is the number of pages) is always larger, so we end up with a bunch of blank pages at the end of the chapter. Once the book is loaded and we switch chapter and then go back to that chapter, the number of pages returned is corrected and we don't have blank pages any longer.
Please let us know if you require more details.
Thanks!
The text was updated successfully, but these errors were encountered: