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

Some pages may be missing in epubBook.chapters #26

Open
shouki-s opened this issue Jan 30, 2024 · 1 comment
Open

Some pages may be missing in epubBook.chapters #26

shouki-s opened this issue Jan 30, 2024 · 1 comment

Comments

@shouki-s
Copy link

In version 4.0.0 (and I think earlier as the same), some pages are missing.

Try with Sway.epub. I am comparing the view of epubx (with epub_view) and "book" (pre-installed on macosx). In epubx, Sway_copyright.html, Sway_toc.html, Sway_body_split_000.html and Sway_body_split_000.html are not showing up.

This seems to be because the .chapters are made from NCX, so items that are in Spine and not in NCX are missing.

In Spine, all xhtml files are defined.

  <spine toc="ncx">
    <itemref idref="ut8KdiaIv9Ka6BnbBwmGtD5"/> <!-- OEBPS/cover.xml -->
    <itemref idref="copyright"/> <!-- OEBPS/Sway_copyright.html -->
    <itemref idref="toc"/> <!-- OEBPS/Sway_toc.html -->
    <itemref idref="book5"/> <!-- OEBPS/Sway_body_split_000.html -->
    <itemref idref="book4"/> <!-- OEBPS/Sway_body_split_001.html -->
    <itemref idref="book3"/> <!-- OEBPS/Sway_body_split_002.html -->
    <itemref idref="book2"/> <!-- OEBPS/Sway_body_split_003.html -->
    <itemref idref="book1"/> <!-- OEBPS/Sway_body_split_004.html -->
  </spine>

However, in toc.ncx, only 3 navPoints are defined.

  <navMap>
    <navPoint class="titlepage" id="level1-titlepage" playOrder="1">
      <navLabel>
        <text>AUTHOR'S NOTE</text>
      </navLabel>
      <content src="OEBPS/Sway_body_split_002.html"/>
    </navPoint>
    <navPoint class="book" id="level1-book1" playOrder="2">
      <navLabel>
        <text>PART ONE</text>
      </navLabel>
      <content src="OEBPS/Sway_body_split_003.html"/>
      <navPoint class="chapter" id="level2-book1chap01" playOrder="3">
        <navLabel>
          <text>THE HOUSES, 1969</text>
        </navLabel>
        <content src="OEBPS/Sway_body_split_004.html"/>
      </navPoint>
    </navPoint>
  </navMap>

Currently, I believe that getting contents from chapters is dangerous due to the possibility of missing pages. Is there any solution to this problem?

@devout-coder
Copy link

devout-coder commented Jan 1, 2025

Did you find a solution to this problem? I also tried accessing the content for each item of the list of entires of epubBook.Content?.Html but it has the exact same issue. Infact when I tried doing it this way a lot of chapters were missing.

      epubBook.Content!.Html!.entries.forEach((entry) {
        //entry.value.Content
      });

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

2 participants