Skip to content

EPUB Fixed layout content do not display correctly #257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ajeanjean-vivlio opened this issue Aug 3, 2022 · 3 comments
Closed

EPUB Fixed layout content do not display correctly #257

ajeanjean-vivlio opened this issue Aug 3, 2022 · 3 comments

Comments

@ajeanjean-vivlio
Copy link

Bug Report

What happened?

Today we faced an issue with epub fixed-layout on android. Some books do not display correctly. They open, but the height of the <Body> is insufficient. You just see a line, or nothing at all.

By debugging the Iframe and manipulating the css, you just need to add the css property height:700px to see the page content appear.

On IOS and on the web no problem.

There is a file on swift-toolkit named : readium-fixed-wrapper.js that we did not find out on kotlin-toolkit. I don't know if the problem comes specifically from there. But it seems to miss a calculation step to determine the iframe size on the android side.

Expected behavior

We should calculate the size needed to display the book content.

How to reproduce?

  1. Open book on android
  2. Open chrome inspector
  3. Click on inspect
  4. Add css property height: 700px to <Body>

Environment

  • Readium version: 2.2.0

Development environment

  • OS: macOS 12.2.1
  • IDE: Android Studio 2021.1.1

Testing device

  • Android version: 12
  • Model: Pixel 5 API 32
  • Is it an emulator? Yes

Additional context

Here are some screenshots:

Android without changing css
Screenshot 2022-08-03 at 15 55 25

Android with updated css
Screenshot 2022-08-03 at 16 07 32

IOS
Screenshot 2022-08-03 at 15 59 00

Thank you for your help.

@ajeanjean-vivlio ajeanjean-vivlio changed the title EPUB Fixed layout do not display content correctly EPUB Fixed layout content do not display correctly Aug 3, 2022
@mickael-menu
Copy link
Member

Note to self: les-secrets-de-fantomette.epub

We probably need to extract the page size from the viewport meta tag instead of expecting that FXL books have height and width set.

@mickael-menu mickael-menu removed the bug label Apr 23, 2025
@mickael-menu
Copy link
Member

@qnga Maybe something to test out in the new Navigator? Unfortunately I can't find the book anymore.

@mickael-menu mickael-menu closed this as not planned Won't fix, can't repro, duplicate, stale Apr 25, 2025
@qnga
Copy link
Member

qnga commented Apr 25, 2025

The new navigator is closer to the Swift one than to this one: we do extract the size from the viewport tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants