Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 05:22 PM   #1
mallomar
Connoisseur
mallomar shines like a glazed doughnut.mallomar shines like a glazed doughnut.mallomar shines like a glazed doughnut.mallomar shines like a glazed doughnut.mallomar shines like a glazed doughnut.mallomar shines like a glazed doughnut.mallomar shines like a glazed doughnut.mallomar shines like a glazed doughnut.mallomar shines like a glazed doughnut.mallomar shines like a glazed doughnut.mallomar shines like a glazed doughnut.
 
mallomar's Avatar
 
Posts: 67
Karma: 8682
Join Date: May 2018
Device: Onyx Boox Note Air 2, Kindle Oasis 2
KFX to EPUB conversion can break page-list, while KFX Input plugin works consistently

When converting KFX files containing page number information to EPUB using Calibre's standard conversion engine (the "Convert books" button), the resulting page-list in the nav.xhtml can sometimes be broken or have its href attributes stripped. While this doesn't seem to happen with every single KFX file, I have found it to be a frequent issue. When it occurs, it makes the reference page numbers unusable in compliant e-reader software like KOReader and causes the EPUB to fail epubcheck with pathing errors (RSC-007).

This issue does not appear to happen when converting the same KFX files using the KFX Input plugin's dedicated conversion feature, which has been consistently successful.

Steps to Reproduce:
  1. Start with a KFX-format book that is known to contain a page map where this issue can be reproduced.
  2. Convert the book to EPUB using Calibre's standard "Convert books" feature.
  3. Inspect the output EPUB. The <nav epub:type="page-list"> section within nav.xhtml may have incorrect or missing href attributes for its list items. For example, <a>1</a> instead of <a href="OEBPS/file.xhtml#page_1">1</a>.
  4. Now, take the same original KFX file and convert it again, but this time use the KFX Input plugin's conversion method (e.g., right-click the book -> KFX Input -> Convert to EPUB).
  5. Inspect this second EPUB. Its page-list is generated correctly with complete and valid href attributes.

There appears to be a discrepancy in how Calibre's main conversion engine and the KFX Input plugin handle the page map data from some KFX source files. The standard engine can fail to correctly reconstruct the page-list navigation, leading to a broken EPUB. The plugin's method, however, seems to produce a correctly structured and functional EPUB more reliably.

I can provide scrambled versions of the EPUBs generated by both Calibre's standard converter and the KFX Input plugin for a direct comparison if that would be helpful for debugging.

My System Details:
  • Calibre Version: [8.16]
  • Operating System: [macOS Sequoia 15.6]
(I am posting this here because I was unable to use the official bug tracker. This is the second time I've tried to report this bug on Launchpad over the last few weeks, and I receive an "Oops!" error page each time I try to log in.)
mallomar is offline   Reply With Quote
Old Yesterday, 06:14 PM   #2
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,716
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Latest calibre version is 8.6 ==>> https://calibre-ebook.com/whats-new

BR
BetterRed is online now   Reply With Quote
Old Yesterday, 06:21 PM   #3
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,108
Karma: 168983686
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by mallomar View Post
My System Details:
  • Calibre Version: [8.16]
  • Operating System: [macOS Sequoia 15.6]
(I am posting this here because I was unable to use the official bug tracker. This is the second time I've tried to report this bug on Launchpad over the last few weeks, and I receive an "Oops!" error page each time I try to log in.)
Is the calibre version a typo? It is 10 major versions ahead of the current calibre 8.6 release.

And the MacOS Sequoia version would appear to be a beta.

As for the difference between using the calibre conversion pipeline and the KFX Input plugin? What you are running into is the same reason I use the KindleUnpack plugin for azw3/KF8. The output ePub generated by KindleUnpack is a lot closer to the original ePub input to KDP than is the output from the calibre conversion pipeline. OTOH, the calibre conversion can handle a lot more formats. That it can munge the structure, CSS, etc. of an output ePub from the semicompiled KFX or azw3/KF8 input is something that you may have to live with if you are going to insist on using calibre's conversion pipeline.

I suspect that you are not going to see any major changes in the calibre conversion pipeline since that would be time intensive with testing required on multiple formats both input and output.

Last edited by DNSB; Yesterday at 06:23 PM.
DNSB is online now   Reply With Quote
Old Yesterday, 09:32 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,339
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
KFX isnt a supported format in calibre, except via the third party KFX Input plugin. You should report the issue in that plugin's thread.
kovidgoyal is offline   Reply With Quote
Old Today, 02:25 PM   #5
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 7,068
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by mallomar View Post
I can provide scrambled versions of the EPUBs generated by both Calibre's standard converter and the KFX Input plugin for a direct comparison if that would be helpful for debugging.
I am willing to look into it if you provide the files that exhibit the problem.
jhowell is offline   Reply With Quote
Old Today, 08:35 PM   #6
mallomar
Connoisseur
mallomar shines like a glazed doughnut.mallomar shines like a glazed doughnut.mallomar shines like a glazed doughnut.mallomar shines like a glazed doughnut.mallomar shines like a glazed doughnut.mallomar shines like a glazed doughnut.mallomar shines like a glazed doughnut.mallomar shines like a glazed doughnut.mallomar shines like a glazed doughnut.mallomar shines like a glazed doughnut.mallomar shines like a glazed doughnut.
 
mallomar's Avatar
 
Posts: 67
Karma: 8682
Join Date: May 2018
Device: Onyx Boox Note Air 2, Kindle Oasis 2
Quote:
Originally Posted by BetterRed View Post
Latest calibre version is 8.6 ==>> https://calibre-ebook.com/whats-new

BR
Thanks, I mistyped, it's Calibre 8.6

Quote:
Originally Posted by DNSB View Post
Is the calibre version a typo? It is 10 major versions ahead of the current calibre 8.6 release.

And the MacOS Sequoia version would appear to be a beta.
Yes, a typo and yup, you're correct, it's a beta, though I don't imagine that's having an impact here.

Quote:
Originally Posted by DNSB View Post
As for the difference between using the calibre conversion pipeline and the KFX Input plugin? What you are running into is the same reason I use the KindleUnpack plugin for azw3/KF8. The output ePub generated by KindleUnpack is a lot closer to the original ePub input to KDP than is the output from the calibre conversion pipeline. OTOH, the calibre conversion can handle a lot more formats. That it can munge the structure, CSS, etc. of an output ePub from the semicompiled KFX or azw3/KF8 input is something that you may have to live with if you are going to insist on using calibre's conversion pipeline.

I suspect that you are not going to see any major changes in the calibre conversion pipeline since that would be time intensive with testing required on multiple formats both input and output.
Thank you, I've been using boh KFX Input's KFX to EPUB and Kindle Unpack's KF8 to EPUB because of these same reasons, but I figured these two plugins handling it better than Calibre must be a bug in Calibre. I've been using Calibre for over a decade (since 2014) but I am not a developer and do not deem to understand all of its many intricacies.

Quote:
Originally Posted by kovidgoyal View Post
KFX isnt a supported format in calibre, except via the third party KFX Input plugin. You should report the issue in that plugin's thread.
Thanks, I thought KFX showing up in Calibre's conversion menu meant it's being handled by Calibre, but I guess not? What is handling the conversion if it's not Calibre and KFX Input's convert to EPUB gives different results?

Quote:
Originally Posted by jhowell View Post
I am willing to look into it if you provide the files that exhibit the problem.
Sure, we discussed one book here. I am attaching the scrambled EPUB from Calibre's conversion engine and from KFX Input's Convert to EPUB. I have also noticed the problem recently in two other books – Big Swiss and Chain Gang All Stars. I am attaching the scrambled KFX Input and Calibre Engine conversions for those as well.
mallomar is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Conversion Plugin] KFX Input jhowell Plugins 1025 Yesterday 01:59 PM
Fixed page KPS to KFX or blank PDF to KFX conversion? jackm8 Conversion 4 04-08-2024 06:19 AM
EPUB to KFX conversion insights Goli4th Library Management 7 07-16-2022 04:30 PM
Epub to KFX conversion issue Surreal Introduce Yourself 0 10-18-2019 02:15 PM
ePub to KFX (no page numbers?) Futuregrace Conversion 4 05-24-2018 03:11 PM


All times are GMT -4. The time now is 09:37 PM.


MobileRead.com is a privately owned, operated and funded community.