-
Notifications
You must be signed in to change notification settings - Fork 192
Add support for images in EPUB reading order #695
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds support for bitmap images in EPUB reading order by treating them as fixed-layout Divina publications. The changes enable EPUBs with images directly in the spine to render correctly using the fixed-layout navigator, with proper fallback handling and automatic Divina profile inference.
Changes:
- Enhanced EPUB parsing to handle fallback chains, preferring bitmap images over HTML when both are present
- Modified image-based publications to remove default center page property for covers
- Added async PDF document loading to prevent UI freezes with large files
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| Sources/Streamer/Parser/EPUB/OPFParser.swift | Implements fallback handling and Divina inference for image-based EPUBs |
| Sources/Streamer/Parser/EPUB/EPUBManifestParser.swift | Minor cleanup removing unused variable |
| Sources/Streamer/Parser/Image/ImageParser.swift | Removes automatic center page property assignment for first page |
| Sources/Navigator/PDF/PDFNavigatorViewController.swift | Adds async PDF document loading off main thread |
| Sources/Navigator/EPUB/Scripts/src/fixed-page.js | Adds bitmap image wrapping in HTML with accessibility support |
| Sources/Shared/Publication/Manifest.swift | Updates EPUB conformance check to use metadata instead of content type |
| Tests/StreamerTests/Parser/EPUB/OPFParserTests.swift | Adds comprehensive tests for fallback handling and Divina inference |
| Tests/StreamerTests/Parser/EPUB/EPUBManifestParserTests.swift | Updates tests to remove deprecated id property |
| Tests/StreamerTests/Parser/Image/ImageParserTests.swift | Updates test for center page property behavior |
| Multiple test fixture files | New OPF test fixtures for fallback scenarios |
| CHANGELOG.md | Documents new features, deprecations, and fixes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Adds support for EPUBs with bitmap images directly in the spine, rendering them as Divina (fixed-layout) publications.
Added
Navigator
Streamer
alternatesin the correspondingLink.Deprecated
Streamer
idattribute is no longer exposed inLink.properties.Fixed
Navigator