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 09-05-2024, 09:57 PM   #751
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: 6,640
Karma: 26963509
Join Date: Apr 2009
Location: USA
Device: iPhone 15PM, Kindle Scribe, iPad mini 6, PocketBook InkPad Color 3
A couple of issues with KFX->PDF (specifically with KFX manga/comic format):

1: 'Binding' document property (what Acrobat calls it) should reflect page reading direction of source (e.g. for manga/japanese it should be right-to-left).

Currently it assumes left-to-right page direction, but that messes with PDF books that are laid out for right-to-left page order, such as manga: 2 page spreads will have left and right pages reversed.

I happen to have Acrobat Pro and am able to change it, but Acrobat Reader apparently will not let you do this (option in Advanced document properties is disabled).

It is sorta odd that PDF viewers do not typically let you change it, or even pay attention to it if it is set (Apple Books does not, PDF Expert does not). In such cases the only recourse seems to be to avoid 2-page layout.

It looks like something you can set with PyPDF in ViewerPreferences dictionary:

https://pypdf.readthedocs.io/en/stab...s.html#example

It would be too much to expect every PDF viewer to pay attention to this, but at least Adobe Reader does. And of course it is only an issue in 2-page layout.

2: This is a bit more involved: there are sometimes images with 2-page spreads, twice the width of non-spread images. Conversion to PDF writes out a single page, which of course does not 'spread' in 2 page layout, and only consumes one page instead of two, so it's complicated to add PDF page labels that correspond to what may be in the image.

The first workaround I did for this was to rotate the spread 90 deg clockwise and insert a blank page before or after the spread (depending on page reading direction) forming a sort of pseudo spread that also preserves expected left/right ness of the 'single' pages and normal page numbering.

But the 'correct' thing is to split the image in half and make two pages instead of just one, which is how I am fixing things up now.

My method is not particularly portable or automate-able: I happen to have a page splitter script for Acrobat Pro, which I apply to extracted spread pages, and then I replace the existing spread pages with the split spread pages (again paying attention to page reading order). Often a spread page is a target of a PDF bookmark so I have to fix that too. But it doesn't take that much time. f

I'm not sure how I'd do it without the page splitter script. Even image split-in-half scripts are typically one image at a time. Kindle Comic Converter probably: it can split 'wide' images that it finds and output to CBZ, and then you could make a PDF out of that. So then KFX->CBZ would be first step.

But 'it would be nice' if From KFX->PDF just handled it.

Note that none of this applies to Print Replica KFX: it does not support 2-page layout (maybe someday, one can only hope).

The other fixed layout format (not sure how you create or publish one -- InDesign and submit FXL ePub probably? Kindle Create doesn't do it.) are KF8 fixed-layout that have text in addition to images and unlike Print Replica, support facing pages and have spreads. I think KindleUnpack coverts these to ePub FXL pretty well, and I think calibre can convert these to PDF pretty well or did last time I tried it. In any case, not anything KFX Input has any role in.

Last edited by tomsem; 09-05-2024 at 10:07 PM.
tomsem is offline   Reply With Quote
Old Yesterday, 02:28 PM   #752
Jaws
JCL Punch-Card Collector
Jaws began at the beginning.
 
Posts: 54
Karma: 10
Join Date: Jun 2014
Location: Antarctica
Device: Aggressively Device Independent
Question Quirk, Question, Possible Workaround

This is a quirk that I haven't seen mentioned here, and it's a quirk of Kindle for PC (but directly related to importing KFX files). I'm wondering if this is "just something" resulting from programmers not anticipating a workflow or a necessary consequence... and, fortunately, I've found a workaround that works for me if it's an actual glitch/problem.

Kindle for PC (stretching back a lot of versions, but definitely up to 2.3.0) has trouble fully downloading newly-added books during sync if a book was deleted in the Kindle library at the 'zon since the last sync. I run Kindle for PC from a command script (batch file) that does the overwrite-the-update-file-with-trash-to-prevent-automatic-updates dance — but it's not open while I'm in the account at the 'zon, only after I sign out of that account. This results in what appears to be an adequate sync, but trying to read the book (to check editions, for example, which can be a real problem in the 'zon's online interface) in either Kindle for PC or by importing into Calibre through KFX-Input results in a read failure. I get the same behavior if I attempt to open a second Kindle for PC session while the first one is open — and once if I ran Kindle for PC directly (without using that batch file). If I shut down Kindle for PC and look at the "downloaded files" in the folder, the filenames are there, but are 0 bytes in length (sometimes the AZW is a fraction of the successful-download-size of the ebook).

The question: Is anyone else seeing this, or is it an artifact of however I've got my machine and accounts set up, and of my process of logging off the the 'zon (in my browser) at any moment I'm not actually engaging on the 'zon?

The workaround: Close Kindle for PC and restart it. I'm mentioning this because this may not be the only related glitch. Or maybe it's a feature, not a bug.

Possible cause: Some session flag somewhere in Kindle for PC, triggered by the delete-a-book process when not logged in to the 'zon account, that tells the sync function "wait a minute, I'm deleting something asynchronously"... and doesn't get reset upon finishing the deletion, but instead is reset only on Kindle for PC program start. That's nothing that can be managed outside of the 'zon itself, but it may be something to keep an eye on (if it's a correct understanding).
Jaws is offline   Reply With Quote
Old Yesterday, 09:55 PM   #753
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: 6,640
Karma: 26963509
Join Date: Apr 2009
Location: USA
Device: iPhone 15PM, Kindle Scribe, iPad mini 6, PocketBook InkPad Color 3
There is an issue with spreads when authoring KFX with Kindle Create and then converting to ePup using From KFX: the <itemref> for spread pages have no properties attribute, so they get rendered (and squished) onto a single page rather than spread across two (I'm testing with Thorium Reader).

So for example:

<itemref idref="part0067.xhtml"/>

should be

Code:
 <itemref idref="part0067.xhtml" properties="rendition:page-spread-center"/>
I have not seen this when converting KFX to ePub with one downloaded by Kindle for Windows; the required property is set. AFAICT there is nothing I can set in Kindle Create to control this (the page is marked as 'single page' instead of 'facing page').

I tried using the same properties value for the cover page, so it is centered, and I think that looks better than having it to one side or the other in 2-page view. It's how Kindle Create previewer shows it, as well as any other pages marked as 'single page'. (I do not know if there is a more semantically correct value to use for this, but at least this one seems to work.)

Last edited by tomsem; Today at 12:49 AM.
tomsem is offline   Reply With Quote
Old Today, 09:59 AM   #754
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,669
Karma: 86234809
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by tomsem View Post
1: 'Binding' document property (what Acrobat calls it) should reflect page reading direction of source (e.g. for manga/japanese it should be right-to-left).
That should be easy. I will add that to my to do list.

Quote:
Originally Posted by tomsem View Post
2: This is a bit more involved: there are sometimes images with 2-page spreads, twice the width of non-spread images. Conversion to PDF writes out a single page, which of course does not 'spread' in 2 page layout, and only consumes one page instead of two, so it's complicated to add PDF page labels that correspond to what may be in the image.
I might be able to handle this simply by adding an option to split images that are in landscape orientation when a comic is in portrait orientation.

It will likely be several weeks before I have time to work on these things.
jhowell is offline   Reply With Quote
Old Today, 10:04 AM   #755
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,669
Karma: 86234809
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by Jaws View Post
Is anyone else seeing this, or is it an artifact of however I've got my machine and accounts set up, and of my process of logging off the the 'zon (in my browser) at any moment I'm not actually engaging on the 'zon?
I have seen Kindle for PC hang after clicking on a book cover in the library view to download a book. It usually works correctly after a retry. This might be related to what you are experiencing.

I do not have any suggestions on getting it to work more reliably in an automated environment.
jhowell is offline   Reply With Quote
Old Today, 10:09 AM   #756
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,669
Karma: 86234809
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by tomsem View Post
There is an issue with spreads when authoring KFX with Kindle Create and then converting to ePup using From KFX: the <itemref> for spread pages have no properties attribute, so they get rendered (and squished) onto a single page rather than spread across two (I'm testing with Thorium Reader).
I will look into this once I have more free time.
jhowell is offline   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 10:30 AM.


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