Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 11-23-2023, 05:22 AM   #601
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,562
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by beam05 View Post
I do not understand this at all.

Open a command/terminal window in your OS and change to the folder where the KFX file was saved.
Use "--pdf" option of the KFX Input plugin CLI to extract PDF content. Eg:
calibre-debug -r "KFX Input" -- --pdf "my book file.kfx"

I have a KPF file from Kindle Create that I want to convert to EPUB while keeping all of the format. Can you explain this in details? I'm very new, sorry.
The bit you've quoted from the instructions is for producing a PDF (not ePub) file from a Print-Replica kindle book. Not what you're asking about at all.


Once you've successfully imported the ebook into calibre, just use the calibre GUI to convert the book to ePub. No need for the command line at all.
pdurrant is offline   Reply With Quote
Old 11-28-2023, 07:38 AM   #602
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: 6,540
Karma: 84500001
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Version 2.6.0 - 28 Nov 2023

Add the ability to convert fixed-layout books to CBZ format using the plugin's command line interface.

Do not produce a .kfx-zip file if only a single KFX file without DRM is found on import.

Ignore any AppleDouble files present in .kfx-zip files under MacOS. (Fixes "Unable to determine KFX container type of __MACOSX/B0000000_EBOK/._B0000000_EBOK.azw (00 05 16 07 00 02 00 00)'")
jhowell is online now   Reply With Quote
Advert
Old 11-30-2023, 09:31 AM   #603
sitrucz
Connoisseur
sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.
 
sitrucz's Avatar
 
Posts: 55
Karma: 40919
Join Date: Sep 2012
Device: Kindle Paperwhite 3, Apple iPad Mini
Quote:
Originally Posted by jhowell View Post
Version 2.6.0 - 28 Nov 2023

Add the ability to convert fixed-layout books to CBZ format using the plugin's command line interface.

Do not produce a .kfx-zip file if only a single KFX file without DRM is found on import.

Ignore any AppleDouble files present in .kfx-zip files under MacOS. (Fixes "Unable to determine KFX container type of __MACOSX/B0000000_EBOK/._B0000000_EBOK.azw (00 05 16 07 00 02 00 00)'")
Thank you for your help and plugin. I converted to epub using the command line interface as I received an error in Calibre trying to convert to ePub. The pub looks good in Calibre. The true book has been removed below and replaced with mybook.kfx.

Code:
calibre-debug -r "KFX Input" -- -e -p mybook.kfx
Without the -p I received this error:

Quote:
WARNING: This book contains PDF content. Use the --pdf option to extract it.
What does "Syntax Warning: Illegal annotation destination" mean? Can I resolve that?
sitrucz is offline   Reply With Quote
Old 11-30-2023, 07:39 PM   #604
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: 6,540
Karma: 84500001
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Quote:
Originally Posted by sitrucz View Post
What does "Syntax Warning: Illegal annotation destination" mean? Can I resolve that?
It means that there are errors in the PDF file extracted from KFX format. The result is that some internal links between pages of the PDF will not function. There is nothing you can do to fix or prevent this. It is a consequence of Amazon's mangling of the PDF during conversion to KFX format.
jhowell is online now   Reply With Quote
Old 12-04-2023, 06:05 PM   #605
4L4RIC
Junior Member
4L4RIC began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2023
Device: none
Question Comic panel sizes and positions

I've been down a rabbit hole today that has lead me here.

I built a web based comic book reader I've been using to publish comics my friends and I are making together. I've been coding in the panel positions on each page by hand and was working GUI to label the panels more quickly when I just discovered the Kindle Comic Creator which does almost exactly what I need but creates the .kpf files that this plug-in seems to be able to export.

My questions is, is there a feasible way to use Amazon's tool then use this KFX Input plug-in to export a file with the panel positions/dimensions for each page? I've tried exporting a few of the formats from the plug-in but haven't found anything that actually looks like that information to me.

Thanks so much for the awesome tool. Cheers.
4L4RIC is offline   Reply With Quote
Advert
Old 12-05-2023, 02:51 AM   #606
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: 6,540
Karma: 84500001
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Quote:
Originally Posted by 4L4RIC View Post
My questions is, is there a feasible way to use Amazon's tool then use this KFX Input plug-in to export a file with the panel positions/dimensions for each page? I've tried exporting a few of the formats from the plug-in but haven't found anything that actually looks like that information to me.
You can use the CLI of this plugin to convert the KFP file to an EPUB that has the equivalent information. Each page of the comic will have an associated XHTML file inside the EPUB with Kindle-specific markup. That markup is not well documented anywhere that I know of. There is a little information about it here but not really enough to be useful.

There will be no simple list of panels anywhere in there. Instead it has instructions for magnifying the page so that each panel will be enlarged to fill the screen. You should be able to reverse engineer approximate panel dimensions and positions from that.

What you want to do might be possible, but will be very difficult. I recommend finding a different approach.
jhowell is online now   Reply With Quote
Old 12-05-2023, 12:29 PM   #607
4L4RIC
Junior Member
4L4RIC began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2023
Device: none
Quote:
Originally Posted by jhowell View Post
There will be no simple list of panels anywhere in there. Instead it has instructions for magnifying the page so that each panel will be enlarged to fill the screen. You should be able to reverse engineer approximate panel dimensions and positions from that.
This is where I'm at now, I just figured out about unzipping .epubs cause I'm so new to the space. I think the info I need is actually in the styling for the magnification source.

Code:
<div
      id="magnify_source_1346"
      style="
        height: 535px;
        left: 1279px;
        position: absolute;
        top: 2422px;
        width: 419px;
      "
    >
I'll need to do some testing to make sure. Thanks for the help!
4L4RIC is offline   Reply With Quote
Old 12-11-2023, 09:13 PM   #608
Asura
Junior Member
Asura began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jan 2023
Device: none
Thanks!

Just wanted to say thanks as someone who loves buying books on amazon but hate DRM I'm happy that we have a new way to get rid of DRM again! Thanks so much people in mobileread!
Asura is offline   Reply With Quote
Old 12-20-2023, 11:52 PM   #609
Lemm
Junior Member
Lemm began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2023
Device: none
Quote:
Originally Posted by jhowell View Post
Version 2.6.0 - 28 Nov 2023

Add the ability to convert fixed-layout books to CBZ format using the plugin's command line interface.

Do not produce a .kfx-zip file if only a single KFX file without DRM is found on import.

Ignore any AppleDouble files present in .kfx-zip files under MacOS. (Fixes "Unable to determine KFX container type of __MACOSX/B0000000_EBOK/._B0000000_EBOK.azw (00 05 16 07 00 02 00 00)'")
Thank you for the great work on this plugin! I have a question about the CBZ and epub files that get generated.

When I compare the output jpg files to the unpacked resources from the KFX (-u in the CLI), I notice more jpg compression artifacts and some distortion with images (like some lines looking more jagged and less vibrant when compared to the unpacked resources tiles or a full sized screenshot from the Kindle app). Is the output jpg quality compression something that could be adjusted higher or losslessly? Or is the quality being affected by the ePub 3 conversion happening in the middle? If so, would there be a way to lessen the compression that seems to be occurring on images in the epub conversion? It's just something that I've noticed when I zoom in on things while reading. Thank you!
Lemm is offline   Reply With Quote
Old 12-21-2023, 09:45 AM   #610
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: 6,540
Karma: 84500001
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Quote:
Originally Posted by Lemm View Post
When I compare the output jpg files to the unpacked resources from the KFX (-u in the CLI), I notice more jpg compression artifacts and some distortion with images (like some lines looking more jagged and less vibrant when compared to the unpacked resources tiles or a full sized screenshot from the Kindle app). Is the output jpg quality compression something that could be adjusted higher or losslessly? Or is the quality being affected by the ePub 3 conversion happening in the middle? If so, would there be a way to lessen the compression that seems to be occurring on images in the epub conversion? It's just something that I've noticed when I zoom in on things while reading. Thank you!
In most cases conversion to EPUB or CBZ by the plugin preserves the original image resources from KFX format. One situation where that is not possible is when KFX format contains a grid of tiles in place of a single image as sometimes occurs for high resolution images.

The current version of the plugin combines the tiles into a single JPEG image with approximately the same quality as the original tiles. That can lead to some slight degradation and artifacts. The next release of the plugin will instead produce a PNG image that will capture the content of the original tiles losslessly.

Another possible source of image changes is calibre itself. If you convert using the calibre conversion routine instead of the plugin CLI there can be rescaling of large images unless you set the Output Profile to Tablet.
jhowell is online now   Reply With Quote
Old 12-21-2023, 02:07 PM   #611
Lemm
Junior Member
Lemm began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2023
Device: none
Quote:
Originally Posted by jhowell View Post
The current version of the plugin combines the tiles into a single JPEG image with approximately the same quality as the original tiles. That can lead to some slight degradation and artifacts. The next release of the plugin will instead produce a PNG image that will capture the content of the original tiles losslessly.

Another possible source of image changes is calibre itself. If you convert using the calibre conversion routine instead of the plugin CLI there can be rescaling of large images unless you set the Output Profile to Tablet.
That appears to be what I'm seeing in relation to the tiles. The upcoming PNG option in the next version is fantastic news! I hope you'll keep a JPEG option for users who don't mind it, but I know I'll definitely use PNG as my preference for a lossless backup. I use the CLI exclusively for conversion to avoid any calibre issues.

If you happen to need a tester for the new version, I wouldn't mind helping out and testing the PNG functionality. In the meantime, I look forward to the next version of the plugin! Thank you again!
Lemm is offline   Reply With Quote
Old 12-21-2023, 03:25 PM   #612
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: 6,540
Karma: 84500001
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Quote:
Originally Posted by Lemm View Post
I hope you'll keep a JPEG option for users who don't mind it, but I know I'll definitely use PNG as my preference for a lossless backup. I use the CLI exclusively for conversion to avoid any calibre issues.
The change in the next release will not be configurable. I prefer to keep the number of options to a bare minimum. If I receive a lot of push back I may consider adding an option, but I don't think that is likely to happen.

Quote:
Originally Posted by Lemm View Post
If you happen to need a tester for the new version, I wouldn't mind helping out and testing the PNG functionality. In the meantime, I look forward to the next version of the plugin! Thank you again!
Thanks for the offer. It was a simple change so I do not anticipate any problems with it.

I am working on some other changes at the moment. I expect the next plugin release to be sometime around the end of the year.
jhowell is online now   Reply With Quote
Old 12-30-2023, 09:55 AM   #613
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: 6,540
Karma: 84500001
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Version 2.7.0 - 30 Dec 2023

Add an internal User Interface Action plugin to KFX Input. This provides much of the same functionality as the KFX Input command line interface (CLI) without the need to leave the calibre GUI. It allows conversion of books from KFX to EPUB, PDF, and CBZ formats without using the calibre conversion pipeline. Doing that avoids problems with fixed-layout books that are not well supported by calibre. Enable this feature by going to Preferences, Toolbars & menus, select "The main toolbar" from the dropdown menu, locate and select "From KFX" in the Available Actions list on the left, and click the right pointing arrow to move it over to Current Actions.

Produce PNG instead of JPEG to prevent any loss of image quality when reconstituting high definition images that were split into tiles for KFX format.

The plugin configuration option "Allow import of KFX format books from Kindles" replaces the no longer supported plugin tweak "kfx_input_set_format_virtual".

Include basic metadata in PDF and CBZ files created by conversion from KFX.

Ignore the case of file extensions.
jhowell is online now   Reply With Quote
Old 12-31-2023, 03:06 PM   #614
Raconto
Junior Member
Raconto began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Dec 2023
Device: Kindle
No able to convert Kindle book

Ikeep getting an error when trying to convert. Here is the log. Any help will be much appreciated.

Software versions: KFX Input 2.7.0, calibre 6.23, Windows-10-10.0.19045-SP0
KFX Input plugin help is available at https://www.mobileread.com/forums/sh...d.php?t=291290
Converting C:\Users\myuser\AppData\Local\Temp\calibre_fkacytb 0\h8vt6q1h.kfx-zip
Processing container: XXXXXXXXXX_EBOK.azw
Traceback (most recent call last):
File "calibre_plugins.kfx_input.__init__", line 102, in convert
File "calibre_plugins.kfx_input.kfxlib.yj_book", line 212, in decode_book
File "calibre_plugins.kfx_input.kfxlib.yj_book", line 321, in get_container
calibre_plugins.kfx_input.kfxlib.utilities.KFXDRME rror: Book container XXXXXXXXXX_EBOK.azw has DRM and cannot be converted

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "runpy.py", line 196, in _run_module_as_main
File "runpy.py", line 86, in _run_code
File "site.py", line 83, in <module>
File "site.py", line 78, in main
File "site.py", line 50, in run_entry_point
File "calibre\utils\ipc\worker.py", line 215, in main
File "calibre\gui2\convert\gui_conversion.py", line 38, in gui_convert_override
File "calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert
File "calibre\ebooks\conversion\plumber.py", line 1108, in run
File "calibre\customize\conversion.py", line 242, in __call__
File "calibre_plugins.kfx_input.__init__", line 121, in convert
calibre.ebooks.DRMError: This book has DRM!
Raconto is offline   Reply With Quote
Old 12-31-2023, 04:04 PM   #615
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: 6,540
Karma: 84500001
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Quote:
Originally Posted by Raconto View Post
Ikeep getting an error when trying to convert. Here is the log. Any help will be much appreciated.
...
calibre.ebooks.DRMError: This book has DRM!
See the DRM Concerns section in the first post in this thread.
jhowell is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Conversion Input] Microsoft Doc Input Plugin igi Plugins 76 06-28-2019 04:47 AM
KFX conversion, transfer back to library issue. shoelesshunter Conversion 2 08-22-2017 06:40 PM
[Conversion Input] LaTeX Formulas Input Conversion Plugin sevyls Plugins 0 03-23-2015 05:52 AM
[Input Plugin] DOCX Input SauliusP. Plugins 42 06-05-2013 04:01 AM
Looking For MHT Input Conversion Plugin FlooseMan Dave Plugins 4 03-30-2010 05:52 PM


All times are GMT -4. The time now is 08:52 AM.


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