Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 07-09-2022, 02:40 PM   #1
romad
U.S. Air Force, Retired
romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!
 
romad's Avatar
 
Posts: 210
Karma: 5212
Join Date: Oct 2014
Location: Prescott, AZ
Device: iPad Mini 5 & Mini 6
Weird Text Shift After Conversion

I've had this happen on a few books but haven't been able to figure out why or how to fix it.

OK, these are AZW to ePub conversions using Calibre 3.48, (the last version to work on my iMac running the last OS version possible, Mac OS 10.13.6) and imported into MapleRead SE on my iPad Mini 5.

The vast majority of the time everything works just fine, but in a few cases I get this problem of the text in each chapter shifting left starting on the second page of the chapter and continuing to the last page of the chapter. Then it starts again on each chapter's second page. The character/space shifted to the left shows up on the right edge of the page on the same line. In short chapters, it might be only a few characters by the chapter's end, but in longer chapters, it can be several words shifted off the left edge of the page and onto the right edge.

Has anyone ever seen this kind of problem before?

Last edited by romad; 07-09-2022 at 02:42 PM. Reason: Readability
romad is offline   Reply With Quote
Old 07-09-2022, 04:26 PM   #2
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 776
Karma: 1538394
Join Date: Sep 2013
Device: Kobo Forma
Could you include a screenshot or photo?

If you open the epub in Calibre's Editor, I'd assume there are classes associated with the paragraphs. If you look at the stylesheet in the editor, what do those classes look like?
enuddleyarbl is offline   Reply With Quote
Advert
Old 07-09-2022, 05:19 PM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,740
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Can you please post some of the relevant HTML/CSS code so we can have a look?

Also, on those eBooks that "shift", use the KindleUnpack plugin to shift the KF8 (AZW3) to ePub and then load it into the edit and using the editor's error checker and epubcheck, check for errors and then fix them. Usually, it's very simple to fix whatever needs fixing.
JSWolf is offline   Reply With Quote
Old 07-09-2022, 05:28 PM   #4
romad
U.S. Air Force, Retired
romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!
 
romad's Avatar
 
Posts: 210
Karma: 5212
Join Date: Oct 2014
Location: Prescott, AZ
Device: iPad Mini 5 & Mini 6
Quote:
Originally Posted by DaveLessnau View Post
Could you include a screenshot or photo?

If you open the epub in Calibre's Editor, I'd assume there are classes associated with the paragraphs. If you look at the stylesheet in the editor, what do those classes look like?
OK, when I went and looked at the pages, I realized I'd mis-described what happens. When the text shifts to the left, it goes off the page and appears on the right edge of the preceding page. I took screen shots of pages 2, 3, 6, & 7 of Chapter One (page 7 is the last page in the chapter):



I'll see if I can find those classes you mention.
romad is offline   Reply With Quote
Old 07-09-2022, 05:30 PM   #5
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 776
Karma: 1538394
Join Date: Sep 2013
Device: Kobo Forma
Well, that's different from what I imagined it. I'd guess that's a rendering issue with the reader and not with the html/css of the book. But, it'll be good to make sure.
enuddleyarbl is offline   Reply With Quote
Advert
Old 07-09-2022, 05:36 PM   #6
romad
U.S. Air Force, Retired
romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!
 
romad's Avatar
 
Posts: 210
Karma: 5212
Join Date: Oct 2014
Location: Prescott, AZ
Device: iPad Mini 5 & Mini 6
Quote:
Originally Posted by JSWolf View Post
Can you please post some of the relevant HTML/CSS code so we can have a look?

Also, on those eBooks that "shift", use the KindleUnpack plugin to shift the KF8 (AZW3) to ePub and then load it into the edit and using the editor's error checker and epubcheck, check for errors and then fix them. Usually, it's very simple to fix whatever needs fixing.
If I can figure out how to do so, I will.

OK, after opening the ePub in the Calibre Editor, I determined that part0005.html is Chapter One. It has 67 lines of code. Do I just copy&paste it all here?

As for the Kindle UnPack plug in, these are not KFX DRM since, IIRC, Kindle for Mac 1.17 can't handle KFX. So what will the plugin do on non-KFX Kindle books?

Last edited by romad; 07-09-2022 at 05:44 PM.
romad is offline   Reply With Quote
Old 07-09-2022, 05:52 PM   #7
romad
U.S. Air Force, Retired
romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!
 
romad's Avatar
 
Posts: 210
Karma: 5212
Join Date: Oct 2014
Location: Prescott, AZ
Device: iPad Mini 5 & Mini 6
Quote:
Originally Posted by DaveLessnau View Post
Well, that's different from what I imagined it. I'd guess that's a rendering issue with the reader and not with the html/css of the book. But, it'll be good to make sure.
Yes, I wasn't sure if it is a Calibre or MapleRead SE problem. The weird thing is it has happened to maybe no more than 20 of the about 2000 Kindle books I converted to ePub. Hmm, I still have iBooks.app on this Mac since as much as I hate it, I haven't gotten around to deleting it. I'll import the ePub into it and see what happens. If the problem doesn't exist in iBooks, then the problem is most likely a MapleRead SE problem, I'd say.
romad is offline   Reply With Quote
Old 07-09-2022, 06:31 PM   #8
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,155
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by romad View Post
As for the Kindle UnPack plug in, these are not KFX DRM since, IIRC, Kindle for Mac 1.17 can't handle KFX. So what will the plugin do on non-KFX Kindle books?
The KindleUnpack plugin has nothing to do with KFX. What it will do is extract or generate an epub from a KF8/azw3 file. This file is much closer to the original file without the massive changes to the CSS that can happen in a calibre conversion.

As for the code, post the first and second paragraphs plus any body/html CSS styles and the CSS styles that are used in them. the example here shows what I mean with the relevant body, p and p.indent code that affects those two paragraphs.

Please note that this code is pretty basic. No line height, no text alignment. Those are left for the end user to choose.

Code:
<body>

  <p><b>Law #1:</b>*<b>If a bad guy can persuade you to run his program on your computer, it’s not solely your computer anymore</b></p>

  <p class="indent">It’s an unfortunate fact of computer science: when a computer program runs, it will do what it’s programmed to do, even if it’s programmed to be harmful. When you choose to run a program, you are making a decision to turn over a certain level of control of your computer to it — often *anything up to the limits of what you yourself can do on the computer (and sometimes beyond). It could monitor your keystrokes and send them to criminals eager for the information. It could open every document on the computer, and change the word “will” to “won’t” in all of them. It could send rude emails to all your friends. It could install a virus. It could create a “back door” that lets someone remotely control your computer. It could relay a bad guy’s attack on someone else’s computers. Or it could just reformat your hard drive.</p>
Code:
body {
  display: block;
  font-size: 1em;
  margin: 0 0 0 0;
  padding: 0 0 0 0;
  text-indent: 0;
  widows: 1;
  orphans: 1;
}

p {
  padding: 0.2em 0 0 0;
  margin-block-end: 0em;
  }


p.indent {
  text-indent: 2em;
}

Last edited by DNSB; 07-09-2022 at 06:34 PM. Reason: Added can happen to calibre conversion
DNSB is offline   Reply With Quote
Old 07-09-2022, 10:58 PM   #9
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 776
Karma: 1538394
Join Date: Sep 2013
Device: Kobo Forma
Quote:
Originally Posted by romad View Post
If I can figure out how to do so, I will.

OK, after opening the ePub in the Calibre Editor, I determined that part0005.html is Chapter One. It has 67 lines of code. Do I just copy&paste it all here?...?
For the book text, just copy the first couple of paragraphs as one lump from something like that part0005.html file and paste it between a set of elements here. Then go to the Styles section of the editor and look at the various .css style sheets there. Usually, the one with everything in it here is stylesheet.css. But, it might be different on yours. Look for the bits of styling information in there that match what's showing right at the front of those text paragraphs you copied/pasted.

For instance, in a book I just popped into the editor, the first actual paragraph of the book starts with:
Code:
<p class="nonindent"><span class="dropcaps3line">A</span>....
Looking in stylesheet.css, I find the following matching styling sections:
Code:
.nonindent {
    display: block;
    outline: 0;
    text-align: justify;
    text-indent: 0;
    margin: 0;
    padding: 0
    }
...
.dropcaps3line {
    float: left;
    font-size: 4.5em;
    line-height: 0.75em;
    margin: -0.1em 0.05em -0.4em 0
    }
You'd be looking for classes near where the odd behavior starts (2nd paragraph?).
enuddleyarbl is offline   Reply With Quote
Old 07-09-2022, 11:30 PM   #10
romad
U.S. Air Force, Retired
romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!
 
romad's Avatar
 
Posts: 210
Karma: 5212
Join Date: Oct 2014
Location: Prescott, AZ
Device: iPad Mini 5 & Mini 6
The problem is always on the second to last page of every chapter. If you look at page 2 at the far right of the second line you'll see part of a character & then at the beginning of the second line on page 3, the first word is missing part of the first letter. The word is "didn't" and is in this line:

<p class="calibre1">Feeling guilty for his grousing, Teddy glanced over at Gabriel, but didn’t speak. He fell into step with the marshal as they headed down the main street of Crystal City. They walked the length of the entertainment district past the saloons, brothels, and dance halls without encountering a single person.</p>

I'll look for the stylesheet later but I now suspect the problem is with MapleRead SE, not Calibre.

OK, I think I found the stylesheet.css for the line above:

.calibre1 {
display: block;
text-indent: 1em;
padding: 0;
margin: 0 0 0.2em
}

Last edited by romad; 07-09-2022 at 11:36 PM. Reason: Added stylesheet.css for .calibre1
romad is offline   Reply With Quote
Old 07-10-2022, 05:01 AM   #11
ShellShock
Wizard
ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.
 
ShellShock's Avatar
 
Posts: 1,178
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
I also use MapleRead SE on an IPad Mini 5 to read epubs, and I don’t get this problem. What version of MapleRead are you using? I am on 4.3 (IOS 15.5), but earlier versions were OK too. Also your screenshots mimic real paper pages; I did not know MapleRead could do that. However you switched that paper-like view on, I suggest switching it off.
ShellShock is offline   Reply With Quote
Old 07-10-2022, 07:56 AM   #12
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,740
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
The left margin looks off. Like it's too large. Is there a setting in MapleRead to change the L/R margins?
JSWolf is offline   Reply With Quote
Old 07-10-2022, 07:57 AM   #13
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,740
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
One other thing to try. Use the ScrambleEbook plugin to scramble this eBook and try it again. It is still shows the problem, you can attach the scrambled version so we can see all of the code.
JSWolf is offline   Reply With Quote
Old 07-10-2022, 10:05 AM   #14
romad
U.S. Air Force, Retired
romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!
 
romad's Avatar
 
Posts: 210
Karma: 5212
Join Date: Oct 2014
Location: Prescott, AZ
Device: iPad Mini 5 & Mini 6
Quote:
Originally Posted by ShellShock View Post
I also use MapleRead SE on an IPad Mini 5 to read epubs, and I don’t get this problem. What version of MapleRead are you using? I am on 4.3 (IOS 15.5), but earlier versions were OK too. Also your screenshots mimic real paper pages; I did not know MapleRead could do that. However you switched that paper-like view on, I suggest switching it off.
MapleRead SE 4.3 also. The book view settings are at the top left of the screen, second from the left. The choices are Classic Book (what I use), Modern Book, and Modern Scroll. I tried Modern Book and the problem still exists. It doesn't in Modern Scroll because that doesn't have pages.

Are you converting Kindle books to ePub in Calibre? Remember this is a rare happening to only about 20 books out of 2,000+ over the years. I used iMazing to import the ePub into Books.app on my iPad Mini 5 and there isn't the problem. This tells me that as it was suggested above, the problem has to do with MapleRead's rendering.
romad is offline   Reply With Quote
Old 07-10-2022, 10:08 AM   #15
romad
U.S. Air Force, Retired
romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!romad , Klaatu Barada Niktu!
 
romad's Avatar
 
Posts: 210
Karma: 5212
Join Date: Oct 2014
Location: Prescott, AZ
Device: iPad Mini 5 & Mini 6
Quote:
Originally Posted by JSWolf View Post
The left margin looks off. Like it's too large. Is there a setting in MapleRead to change the L/R margins?
Not that I know of, but I'll look. As I just mentioned above, I don't have the problem in Books.app, so it seems to be a MapleRead problem.
romad is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Weird graphic displays in Kindle text stewartb132 Calibre 4 04-03-2025 02:23 PM
Weird Characters After Conversion Gibbo Kindle Formats 2 02-12-2020 04:35 PM
Weird text replacement C-novice Android Devices 5 12-08-2019 06:48 PM
ADE - Weird text Hicks ePub 4 11-01-2011 02:59 PM
Weird conversion failure franx Amazon Kindle 2 06-06-2010 03:25 PM


All times are GMT -4. The time now is 12:32 AM.


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