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

Add the configuration option to ignore the error for missing manifest item referenced by EPUB spine item #122

Merged
merged 1 commit into from
Dec 25, 2024

Conversation

vers-one
Copy link
Owner

Add the configuration option to ignore the error for missing manifest item referenced by EPUB spine item

This is:

  • a bug fix
  • an enhancement

Related issue: #109

Description

The <spine> section in the EPUB OPF package file represents the default reading order of the EPUB book. Each item inside that section references a manifest item from the same OPF package file:

<itemref idref="manifest-item-id" />

(see this section in the EPUB specification for more details: https://www.w3.org/TR/epub/#sec-pkg-spine)

If the manifest item referenced by a spine item is missing, EpubReader is throwing a EpubReader with the following message:

Incorrect EPUB spine: item with IdRef = "manifest-item-id" is missing in the manifest.

This pull request adds the SpineReaderOptions.IgnoreMissingManifestItems property to let the applications ignore this error. The default value of this property is false.

Testing steps

Try to open a EPUB book with the spine item above.

@vers-one vers-one self-assigned this Dec 25, 2024
@vers-one vers-one merged commit a6a3bd6 into master Dec 25, 2024
4 checks passed
@vers-one vers-one deleted the options branch December 25, 2024 21:23
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.

Exception: 'Incorrect EPUB spine: item with IdRef = "cover" is missing in the manifest.'
1 participant