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 01-25-2026, 02:19 PM   #1141
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,244
Karma: 95018123
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by tomsem View Post
I am noticing that PDF's generated from comic book format with From KFX (converted from KPF) have inflated page dimensions.

For example, given 1238 x 1800 images in original artwork, the page dimensions in the PDF wind up as 17.19 x 25 inches, as if the images had 72 PPI property. In this case 300 PPI would derive 4.13 x 6 inches, which is the physical page size of the printed comic.
The plugin does not currently set the DPI when creating PDF pages. It appears that the default value is 72 for the PDF creation software it uses.

Amazon comic format does not specify actual page sizes since that is not generally relavant for an e-reader. However the underlying image files may sometimes have DPI metadata. I will change plugin to use that when available and otherwise default to 300 dpi.

How that works out will depend on whether or not the underlying images contain reasonable DPI values. I will do some testing before releasing the change.
jhowell is online now   Reply With Quote
Old 01-25-2026, 04:32 PM   #1142
tomsem
Grand Sorcerer
tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.
 
Posts: 7,112
Karma: 28000001
Join Date: Apr 2009
Location: USA
Device: iPhone 15PM, Kindle Scribe, iPad mini 6, PocketBook InkPad Color 3
Quote:
Originally Posted by jhowell View Post
The plugin does not currently set the DPI when creating PDF pages. It appears that the default value is 72 for the PDF creation software it uses.

Amazon comic format does not specify actual page sizes since that is not generally relavant for an e-reader. However the underlying image files may sometimes have DPI metadata. I will change plugin to use that when available and otherwise default to 300 dpi.

How that works out will depend on whether or not the underlying images contain reasonable DPI values. I will do some testing before releasing the change.
In my spot checking, the image DPI does not seem to matter (when I import folder of image files to Kindle Create).

When importing PDF to KC, image objects therein do not have DPI property, and I assume KC is assigning one when it imports these.

Before importing PDF to KC, I take care that the page sizes are accurate so that KC doesn't scale the images up (as recounted earlier in this thread).
tomsem is offline   Reply With Quote
Old 01-26-2026, 04:07 PM   #1143
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,244
Karma: 95018123
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by jhowell View Post
Amazon comic format does not specify actual page sizes since that is not generally relavant for an e-reader. However the underlying image files may sometimes have DPI metadata. I will change plugin to use that when available and otherwise default to 300 dpi.

How that works out will depend on whether or not the underlying images contain reasonable DPI values. I will do some testing before releasing the change.
I have done some testing and the DPI values found in the images in Kindle books are all over the place and not useful. Also, using a fixed value of 300 DPI is good for many books but works poorly for others.

I am now planning on having the code choose from a small set of common DPI the value that results in page sizes in the range of a typical textbook or comic.
jhowell is online now   Reply With Quote
Old 01-27-2026, 03:35 PM   #1144
tomsem
Grand Sorcerer
tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.
 
Posts: 7,112
Karma: 28000001
Join Date: Apr 2009
Location: USA
Device: iPhone 15PM, Kindle Scribe, iPad mini 6, PocketBook InkPad Color 3
That seems like a good approach.

On lower bound, 4.12 x 6 inches is smallest I've seen (for manga that are supposed to fit in a pocket).

On upper bound, 7.5 x 10.5 inches is larger than any I've checked.

However, some of the HB PDFs had double size pages (double width) mixed in. So perhaps only vertical dimension should be considered when determining what is in range.

Last edited by tomsem; 01-27-2026 at 04:45 PM.
tomsem is offline   Reply With Quote
Old 01-27-2026, 04:53 PM   #1145
Bluejinx
Junior Member
Bluejinx began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2025
Device: none
Bug Report: "page_template has extra data" error (Japanese Fixed-layout KFX)

I have encountered a conversion error with certain Japanese fixed-layout KFX books (comics). The conversion fails due to unexpected data in the page_template section.

The behavior differs between the CLI and the GUI:
  • CLI (calibre-debug -r "KFX Input"): It reports the error but continues and successfully creates a functional EPUB file.

    Calibre GUI (Standard Conversion): It raises an Exception and the conversion fails entirely.

Environment:
  • Calibre: 8.16.2

    KFX Input Plugin: 2.28.0

    OS: Windows 11

    BOOK ASIN: B0D8SPYCRH , B0D3TCKTRY

Error Message:

Code:
ERROR: Section [ID] page_template has extra data: {$434: $441}
Logs:

(Note: Personal paths and user names have been masked with <USER> and <PATH>.)

1. CLI Execution (Succeeded with error)

Code:
PS <PATH>> calibre-debug -r "KFX Input" -- -e "C:<PATH>\high.kfx" "C:<PATH>\output.epub"

...

Software versions: KFX Input 2.28.0, calibre 8.16.2, Windows-10-10.0.22631-SP0

...

Metadata: ASIN=B0D8SPYCRH, asset_id=CR!9JBQ9ZFWKX47XFZSSR1VZPMPSD8A, ..., yj_fixed_layout=1

Converting C:<PATH>\high.kfx to EPUB

Converting book to EPUB 3

ERROR: Section c7T page_template has extra data: {$434: $441}

Format is fixed layout comic

Conflicting viewport aspect ratios: 34 @ 0.715052 (2000w x 2797h), 1 @ 1.163467 (2000w x 1719h), 1 @ 0.935454 (2000w x 2138h)

Converted book saved to C:<PATH>\output.epub
2. Calibre GUI/Normal Conversion (Failed with Exception)

Code:
InputFormatPlugin: KFX Input running

on C:\Users<USER>\AppData\Local\Temp\calibre-utr6a_ff\dtzrva4c.kfx

...

Metadata: ASIN=B0D3TCKTRY, asset_id=CR!VZCSJ935852C9510AKHYPPWVQHKX, ..., yj_fixed_layout=1

WARNING: This book has a layout that is incompatible with calibre conversion.

Converting book to EPUB 3

ERROR: Section c9E page_template has extra data: {$434: $441}

Format is fixed layout comic

Traceback (most recent call last):

File "calibre_plugins.kfx_input.init", line 113, in convert

Exception: Section c9E page_template has extra data: {$434: $441}

During handling of the above exception, another exception occurred:

...

calibre.ebooks.conversion.ConversionUserFeedBack: {"msg": "Cannot convert...", "level": "error"}
Thank you for developing and maintaining this indispensable plugin. I would appreciate it if you could look into this when you have time.

Since I can successfully convert these books using the CLI, this is not an urgent issue for me. Please feel free to prioritize this at your convenience. Thank you again for your hard work!
Bluejinx is offline   Reply With Quote
Old 01-27-2026, 06:27 PM   #1146
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,244
Karma: 95018123
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by tomsem View Post
On lower bound, 4.12 x 6 inches is smallest I've seen (for manga that are supposed to fit in a pocket).

On upper bound, 7.5 x 10.5 inches is larger than any I've checked.

However, some of the HB PDFs had double size pages (double width) mixed in. So perhaps only vertical dimension should be considered when determining what is in range.
Thanks for the info.

I plan to select a DPI from a limited set that yields a height closest to 9.5 inches.
jhowell is online now   Reply With Quote
Old 01-27-2026, 06:33 PM   #1147
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,244
Karma: 95018123
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by Bluejinx View Post
Thank you for developing and maintaining this indispensable plugin. I would appreciate it if you could look into this when you have time.
That book has a formatting variation that I have not yet seen. I will try to duplicate the problem using manga that are available to me at Amazon US. I may need further information from you if I am unable to do so.
jhowell is online now   Reply With Quote
Old Yesterday, 12:44 PM   #1148
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,244
Karma: 95018123
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by Bluejinx View Post
Thank you for developing and maintaining this indispensable plugin. I would appreciate it if you could look into this when you have time.
Quote:
Originally Posted by jhowell View Post
That book has a formatting variation that I have not yet seen. I will try to duplicate the problem using manga that are available to me at Amazon US. I may need further information from you if I am unable to do so.
Unfortunately I was unable to find a manga that exhibits this problem. There is something you could do to help.

Since you are already familiar with the CLI of this plugin, you can use it again with the "--unpack" option. That will generate a .zip file. Inside that .zip there will be a file named book.ion. For a comic/manga that file contains only the formatting information for the book without the copyrighted images.

If you could post it to this forum that would be very useful in diagnosing the problem. (You may need to create a new .zip file containing only book.ion in order to post it here.) Thanks.
jhowell is online now   Reply With Quote
Old Yesterday, 06:39 PM   #1149
Bluejinx
Junior Member
Bluejinx began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2025
Device: none
Quote:
Originally Posted by jhowell View Post

If you could post it to this forum that would be very useful in diagnosing the problem. (You may need to create a new .zip file containing only book.ion in order to post it here.) Thanks.
Thanks for looking into this.

Following your advice, I have extracted the formatting information using the unpack option. I have attached a zip file that includes the book.ion files for two separate books.

Please let me know if you need anything else.
Attached Files
File Type: zip ion.zip (14.4 KB, 3 views)
Bluejinx is offline   Reply With Quote
Old Today, 10:22 AM   #1150
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,244
Karma: 95018123
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by Bluejinx View Post
Following your advice, I have extracted the formatting information using the unpack option. I have attached a zip file that includes the book.ion files for two separate books.
Thank you for doing that. I was able to see the formatting being used for a page spread in each of those books that I had not encountered before.

I will release an updated version of the plugin once I do more testing to see whether the fix causes any new problems.
jhowell is online now   Reply With Quote
Old Today, 11:02 AM   #1151
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,244
Karma: 95018123
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Version 2.29.0 - 30 Jan 2026

Handle books with the vertical-align property present in a table colgroup. (Fixes error "Unexpected style definition: $478: True")

Handle formatting of page spreads seen in some Japanese manga. (Fixes error "Section xxx page_template has extra data: {$434: $441}")

Generate more reasonable page sizes when producing PDFs from high resolution images.
jhowell is online now   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 06:14 PM.


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