Skip to content

Conversation

@mickael-menu
Copy link
Member

Adds support for EPUBs with bitmap images directly in the spine, rendering them as Divina (fixed-layout) publications.

Added

Navigator

  • Bitmap images in the EPUB reading order are now supported as a fixed layout resource.

Streamer

  • EPUB manifest item fallbacks are now exposed as alternates in the corresponding Link.
  • EPUBs with only bitmap images in the spine are now treated as Divina publications with fixed layout.
    • When an EPUB spine item is HTML with a bitmap image fallback (or vice versa), the image is preferred as the primary link.

Deprecated

Streamer

  • The EPUB manifest item id attribute is no longer exposed in Link.properties.

Fixed

Navigator

  • PDF documents are now opened off the main thread, preventing UI freezes with large files.

Copy link

Copilot AI left a 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.

@mickael-menu mickael-menu merged commit a44f085 into develop Jan 15, 2026
6 checks passed
@mickael-menu mickael-menu deleted the images-in-spine branch January 15, 2026 16:04
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

Successfully merging this pull request may close these issues.

2 participants