Skip to content
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

How to compute the positions for a Readium Web Publication? #171

Open
mickael-menu opened this issue Mar 23, 2022 · 2 comments
Open

How to compute the positions for a Readium Web Publication? #171

mickael-menu opened this issue Mar 23, 2022 · 2 comments

Comments

@mickael-menu
Copy link
Member

We have an implementer using EPUB converted to actual RWPM in their app, wanting to use the positions service.

Currently in the Readium Mobile Toolkits, we don't have an implementation of the positions service for an ebook RWPM, only for:

  • EPUB
  • PDF
  • CBZ
  • RWPM LCPDF and Divina

Should we provide a default positions service for vanilla/HTML RWPM as well?

I would argue that we can't reasonably determine positions for a real WebPub, as the layout and reading flow is not constrained. However, if a RWPM conforms to the EPUB profile ("conformsTo":"https://readium.org/webpub-manifest/profiles/epub"), we could inject the same Positions Service implementation used by the EPUB parser.

@qnga
Copy link
Contributor

qnga commented Mar 24, 2022

Injecting a Positions service into publications which conform to the EPUB profile does make sense to me. More generally, I think we should ensure that what the RWPM parser outputs with conformsTo including EPUB is similar to what the EPUB parser outputs.

@mickael-menu
Copy link
Member Author

We discussed this issue during the last dev call.

Applying the EPUB positions service to a "streamed" RWPM is not easily feasible, as we need the compressed length equivalent of each resource. Fetching all the resources to calculate the positions list is also not desirable.

The recommended approach is to have the server provides explicitly the positions list as a JSON document, as described in the specification, with a link in the RWPM.

For RWPM conforming to the EPUB profile, we can fallback in two specific cases:

  • If we have a packaged RWP, then we can use the regular EPUB positions service.
  • If the RWPM contains extended metadata for each reading order resources with the archive compressed entry length, then we could use the regular EPUB positions service.

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

No branches or pull requests

2 participants