![]() |
#811 |
Connoisseur
![]() Posts: 57
Karma: 10
Join Date: Aug 2016
Device: Kobo Libra Colour
|
Hi,
I have some ebooks which are full of weird inline CCS causing weird paragraphing and padding to occur. I edited the .azw3 files' CSS and overrode those, and they now appear correctly formatted. p { text-indent : 1.5em !important } span { padding: 0pt !important } However when I convert the resulting .azw3 to .kfx, it would seem that the books go back to being weirdly formatted. Any thoughts? Edit: Kinda fixed my problem by converting .azw3 to .azw3 first, Calibre flattens the inline-CSS into the stylesheet, and then I edited it manually from there Last edited by hengyu; 04-02-2020 at 07:43 AM. |
![]() |
![]() |
![]() |
#812 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,099
Karma: 92190113
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
|
![]() |
![]() |
Advert | |
|
![]() |
#813 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,099
Karma: 92190113
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Version 1.41.0 - 12 Apr 2020
Detect Kindle Previewer versions up to 3.38 and remove support for older versions. Version 3.38 handles additional formatting including page-break-after:avoid and page-break-before:avoid. The Kindle Previewer's command-line interface is now used by this plugin because the undocumented conversion API previously used no longer functions properly. Because of this change the option to perform error tolerant conversion has been removed. Also fixed-layout books (comics and manga) can no longer be converted except when produced using Amazon Kindle Create. Add an option to the plugin's command line interface (CLI) to display conversion logs for debugging. |
![]() |
![]() |
![]() |
#814 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Apr 2020
Device: Samsung Galaxy J20
|
Good day
I've been searching everywhere for ways to convert my Warhammer 40 000 ebooks from EPUB to KFX and stumbled upon this godsend of a thread. I did re-convert the books to EPUB as suggested before converting them to KFX (I'm using an HP laptop with a clean install of Windows 10), but I encounter an error during the conversions of each book. Everything seems to go well but fails with the message: AttributeError: 'KindlePreviewer' object has no attribute 'program_name' I was going to browse for a possible fix in the thread but there's just a ton of pages to look through. Any ideas on what could be wrong? |
![]() |
![]() |
![]() |
#815 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,099
Karma: 92190113
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Quote:
The next release of this plugin will provide a better error message for that situation. Last edited by jhowell; 04-18-2020 at 01:10 PM. Reason: typo |
|
![]() |
![]() |
Advert | |
|
![]() |
#816 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,099
Karma: 92190113
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Version 1.41.1 - 17 Apr 2020
Fix incorrect conversion error message if the Amazon Kindle Previewer is not installed. (Fixes "AttributeError: 'KindlePreviewer' object has no attribute 'program_name'") |
![]() |
![]() |
![]() |
#817 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Apr 2020
Device: Kindle Paperwhite (10th Generation)
|
Thank you very much for this plugin, i've been enjoying books in kfx format on my kindle for a while now thanks to you. I always convert my books from epub 3 and the conversion goes well most of the time. There are just a few small things that i don't understand, mainly about the landmark elements of the toc/nav and a discrepancy between the results i get from converting the epub directly with Kindle previewer (v3.38) and the results i get from converting them with this plugin and reading them on my kindle (paperwhite 10th gen).
In old epub books that use the old method for landmarks in the .opf file like the example below, both kindle previewer and the converted kfx book give me the same result and everything works fine. <guide> <reference type="cover" title="Cover" href="cover.xhtml"/> <reference type="toc" title="Table of Contents" href="toc.xhtml"/> <reference type="text" title="Beginning" href="chapter001.xhtml"/> </guide> One cover, toc works, beginning points to the first chapter, everything's fine. If the epub book uses the newer landmarks in the toc/nav file instead like the example below, kindle previewer will recognize the landmarks properly just like with the old method, but the converted kfx will not. <nav epub:type="landmarks" class="hidden-tag" hidden="hidden"> <h1>Navigation</h1> <ol class="none" epub:type="list"> <li><a epub:type="cover" href="cover.xhtml">Cover</a></li> <li><a epub:type="toc" href="toc.xhtml">Table of Contents</a></li> <li><a epub:type="text" href="chapter001.xhtml">Beginning</a></li> </ol></nav> With these new landmarks the kfx book on my kindle will display the cover twice and the "beginning" will point to the second cover instead of the first chapter. The cover link in the toc also points to the second cover. The toc seems to work fine otherwise. One weird thing i found is that if i flag the cover page as cover in calibre (adding the properties="calibre:title-page" to the cover.xhtml entry of the <manifest> in the .opf file), the double cover will be gone, but the "beginning" will still point to whatever page comes after the cover instead of the first chapter. Any idea why this is happening? Another curiosity about images, it seems to me like the images in the kfx book are getting converted from rgb to grayscale (instead of simply making it a black and white rgb mode jpg) and gaining quite a bit of brightness in the process. Is it just my impression? |
![]() |
![]() |
![]() |
#818 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,099
Karma: 92190113
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Quote:
The calibre conversion pipeline makes a lot of changes to the original book. Books are first converted to an internal format based on EPUB 2. Then a number of manipulations are done on the book that can include cover replacement, image rescaling, and HTML reformatting. The result of that is then passed to the conversion output plugin, KFX Output in this case. KFX Output converts the intermediate format to an EPUB 2 file and then passes that to the Kindle Previewer to generate a KPF file that is then repackaged into the final KFX file. Some of the changes that calibre makes during conversion can be avoided by using the proper settings, others are unavoidable. If you want the KFX file to reflect your original source file as closely as possible then either convert to KPF using the Kindle Previewer, as you have done, and use the command line interface to the KFX Output plugin. That will bypass the calibre conversion pipeline. Color images converted by the Kindle Previewer are left RGB, but may be rescaled and converted to JPEG if not already in that format. The plugin makes no further manipulation of images. The Kindle firmware has to map them to the Kindle's grayscale display. I don't know any of the details of that. Last edited by jhowell; 04-18-2020 at 04:17 PM. |
|
![]() |
![]() |
![]() |
#819 | |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Apr 2020
Device: Kindle Paperwhite (10th Generation)
|
Quote:
Too bad about the images, i was hoping there was some way to change the settings of the image conversion, but i very much doubt amazon will allow such a thing. I assume commands like "text-decoration:none" not working to hide the underlines in links are also entirely handled by kindle previewer and not the plugin, correct? |
|
![]() |
![]() |
![]() |
#820 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,099
Karma: 92190113
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Yes. Amazon really does not want you to mess with the style of links. I suppose that they want them to be obvious to readers. (There are tricks that can be used to work this in MOBI and KF8 formats, but they do not work for KFX.)
|
![]() |
![]() |
![]() |
#821 | |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Apr 2020
Device: Samsung Galaxy J20
|
Quote:
![]() ![]() |
|
![]() |
![]() |
![]() |
#822 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,099
Karma: 92190113
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Quote:
|
|
![]() |
![]() |
![]() |
#823 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 262
Karma: 49504
Join Date: May 2014
Device: Kobo Libra 2
|
{ edit : nevermind}
I have been using this plugin successfully for a while, but I have just now encountered a problem. An epub that I converted did not generate any errors on conversion, and transfers to my Kindle Voyage properly. I can read the book and access any chapter. However, if I return to Home and then reopen the book, I end up back on the cover art rather than where I left off. The progress indicator on the Home page indicates the correct progress until I reopen the book, then returns to 1% after. That might not have been clear, so here's a step by step of what I see on my Kindle: 1. Open book 2. Jump to chapter partway through book. 3. Return to Home. 4. Progress indicator on Home indicates proper distance through book (e.g., 14%). 5. Reopen book 6. Book opens to cover art. 7. Return to Home. 8. Progress indicator indicates 1% read. If I convert to AZW3 I do not see this problem, but then I also don't get the nice ligatures and hyphenations that I get with KFX. The source of the epub was a program that converts a web-published serial to ebook format. I have a second document from the same program and same source that works properly. Does anyone have a suggestion for me? Last edited by fogice; 04-22-2020 at 01:38 PM. |
![]() |
![]() |
![]() |
#824 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,099
Karma: 92190113
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Quote:
It sounds like your Kindle is failing to create or update the file that the device uses to keep track of reading position for that book. You could do some investigation if you attach the Kindle to a PC over USB and examine the file system. Try to find the file that contains the sideloaded KFX book. It will be in the "documents" folder or a subfolder of that. Once you find it there should also be a folder in the same place with the same name as the book file but with the extension ".sdr". Inside that there should be one file with the extension ".yjf" and another with the extension ".yjr". That is where the reading position is kept for a sideloaded KFX book. If those files are missing it would explain the problem, other than finding out why that is happening. (Unusually long filenames might be a possibility.) I can do a test on my own Kindle device if you can send me a PM with a link to a place where I can download the failing KFX file. (Do not post anything that is under copyright here on MobileRead.) Last edited by jhowell; 04-22-2020 at 01:31 PM. |
|
![]() |
![]() |
![]() |
#825 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 262
Karma: 49504
Join Date: May 2014
Device: Kobo Libra 2
|
Quote:
Thanks so much for your help! |
|
![]() |
![]() |
![]() |
Tags |
kfx, linux, wine |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Conversion Output] KePub Output Plugin | jgoguen | Plugins | 588 | 03-28-2025 02:26 PM |
Conversion output plugins? | jgoguen | Development | 14 | 08-10-2013 11:19 AM |
Output file name after conversion | dbellefuil | Calibre | 2 | 06-14-2013 04:40 PM |
catalogue builder output columns are not in the same order in the output | KWhytte | Library Management | 5 | 12-04-2012 02:03 AM |
Conversion output folders | TechieLady | Conversion | 6 | 01-19-2012 02:49 AM |