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 01-31-2016, 10:27 AM   #1
deback
Book E d i t o r
deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.
 
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
Converting epub to epub results in 2 pages in book

I've been fixing the formatting of many epub files, mainly to clean up the code and improve the formatting appearance. When I finish editing a file, I like to convert the edited epub to epub, because I like that Calibre fixes some of the remaining problems in the file. When I do this conversion, I use all the default Calibre settings.

For about three Baldacci novels, after converting the edited epub to epub, the converted epub shows only 2 pages at the top when viewing the file using ADE or on my Nook. All the pages are actually available to read, though.

Is there a common reason for this problem? Is there some code that could be in those files that causes this problem?

Thanks for any help with this!
deback is offline   Reply With Quote
Old 01-31-2016, 11:12 AM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,957
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Why do a same format convert after an edit? Conversion introduces some change.
IMHO Conversion should be done FROM a edited EPUB to some other format

The Calibre editor Validation can help fix all issues that do not require lost or mangled code corrections (that is your job to sus out what went south)
theducks is offline   Reply With Quote
Advert
Old 01-31-2016, 11:27 AM   #3
deback
Book E d i t o r
deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.
 
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
Quote:
Originally Posted by theducks View Post
Why do a same format convert after an edit? Conversion introduces some change.
IMHO Conversion should be done FROM a edited EPUB to some other format

The Calibre editor Validation can help fix all issues that do not require lost or mangled code corrections (that is your job to sus out what went south)
Like I said, converting from the edited epub to epub fixes some of the remaining problems. It fixes the coding in the cover image page, it sorts the .css file alphabetically and changes some of the codes in the file when there are CSS rules that are the same, and a few other things. It doesn't hurt anything to do that, and I like it when it fixes the coding in the cover image page.

Anyway, when you say the Calibre editor Validation can help fix all issues, it hasn't fixed this particular issue (that is, if you are talking about the Check Book function in Calibre...I can't find anything about a Calibre Editor Validation). These books have 300 to over 400 pages, but show only 2 pages after the conversion. This has only occurred with a few books, so I suspect there is some incorrect coding in those files that Calibre's Check Book didn't find. These are retail versions that are very poorly coded (as is the case with so many of the retail epub files), and that's why I went through all of his books and fixed a lot of the problems. I ended up not converting those few books, so it's no big deal, but I'm still curious why converting those files resulted in those few files showing only 2 pages. Converting an epub file twice shouldn't result in this problem.

Thanks for your response!
deback is offline   Reply With Quote
Old 01-31-2016, 11:50 AM   #4
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
You can just use the Add Cover tool from within the Editor itself, it will replace the cover with a nice SVG-wrapped cover the same way conversion does.
eschwartz is offline   Reply With Quote
Old 01-31-2016, 12:07 PM   #5
deback
Book E d i t o r
deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.
 
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
Quote:
Originally Posted by eschwartz View Post
You can just use the Add Cover tool from within the Editor itself, it will replace the cover with a nice SVG-wrapped cover the same way conversion does.
Thanks for your response. I already knew about that command and that really has nothing to do with my question. Also, adding the cover from Tools doesn't make the cover appear the way it does when I convert the edited epub file to epub.

I didn't expect anyone to know the answer to this 2-page conversion problem, because it's probably something specifically coded wrong in those three files that would take a lot of experimentation to find.
deback is offline   Reply With Quote
Advert
Old 01-31-2016, 12:16 PM   #6
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
It *should* make the cover appear the same, it uses the same code to generate the cover file.
Did you check the box to Preserve Aspect Ratio?
eschwartz is offline   Reply With Quote
Old 01-31-2016, 12:22 PM   #7
deback
Book E d i t o r
deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.
 
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
Quote:
Originally Posted by eschwartz View Post
It *should* make the cover appear the same, it uses the same code to generate the cover file.
Did you check the box to Preserve Aspect Ratio?
No, I haven't had that box checked. I've had the boxes for No default cover and No SVG cover checked, and I have Nook chosen for the Output default. I just unchecked No SVG cover and checked the Preserve Aspect Ratio box, and the cover now has a little white space on both sides of the cover. When I convert from edited epub to epub, it has a little bit more white space on both sides of the cover, so there isn't too much difference. (I did this experiment with different epub files than the Baldacci files that resulted in 2 pages...)

Thanks for your response.
deback is offline   Reply With Quote
Old 01-31-2016, 12:39 PM   #8
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Oh... "stupid device" workarounds in the conversion pipeline...
Silly me, I forgot.

So I guess it is possible for conversion and the Editor tool to produce different covers.


So, whichever cover style you want/need, I guess you know the different options now. Hopefully you can now avoid doing a conversion just to fix the cover.
eschwartz is offline   Reply With Quote
Old 01-31-2016, 01:00 PM   #9
deback
Book E d i t o r
deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.
 
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
Quote:
Originally Posted by eschwartz View Post
Oh... "stupid device" workarounds in the conversion pipeline...
Silly me, I forgot.

So I guess it is possible for conversion and the Editor tool to produce different covers.


So, whichever cover style you want/need, I guess you know the different options now. Hopefully you can now avoid doing a conversion just to fix the cover.
Well, there are other reasons for doing the conversion, so I might continue doing it, since it fixes some things you might not realize it fixes. I really only asked the original question because I'm curious as to WHY the conversion resulted in showing only two pages (when all the pages are really there) for these three epub files. I thought someone might know of a common reason why this happens sometimes. I have no other questions and have been using Calibre for a long time to edit and fix books (and learned HTML back in the mid-90s).

Thanks again for your responses.
deback is offline   Reply With Quote
Old 01-31-2016, 01:22 PM   #10
deback
Book E d i t o r
deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.
 
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
I will reword my original question:

In what circumstances would converting an epub to an epub result in a file showing only two pages? (Disregard any reason why I might be converting an epub to an epub, as that is completely irrelevant...)
deback is offline   Reply With Quote
Old 01-31-2016, 01:43 PM   #11
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,957
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by deback View Post
I will reword my original question:

In what circumstances would converting an epub to an epub result in a file showing only two pages? (Disregard any reason why I might be converting an epub to an epub, as that is completely irrelevant...)
The original OPF had defects that the viewer tolerated

The original HTML had coding defects that the viewer tolerated

An OCR scan 'error mark was interpreted as a comment(out) mark

Java coded content

Mostly you need to look at the before source and see what is there near the Last visible parts of the New version. Good ole Mk I eyeball
theducks is offline   Reply With Quote
Old 01-31-2016, 02:28 PM   #12
deback
Book E d i t o r
deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.
 
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
Thanks for your response, theducks. I decided to experiment with one of the "corrupt" files until I found the error (The Innocent by Baldacci).

I did some things, one at a time and then ran a conversion each time -- deleted unnecessary entries for <a id="page-blah">, deleted the page-map.xml file, deleted the TOC entries, -- and after I deleted both the page-map.xml file and the toc.ncx file and recreated the toc.ncx file (Generate entries from files -- with the Edit TOC command under Tools, but I click the icon I've set up in the Toolbar), the file conversion now shows all 384 pages.

Whomever created this particular epub file created TOC entries for every page from the real book. Deleting all that crap fixed the file. I'm pretty sure the other two files that had the same problem probably has a mess in those two files. I'm going to reconvert all the Baldacci novels (about 36 of them), so I can find the other files I had problems with, so I can fix them.

Thanks again!
deback is offline   Reply With Quote
Old 01-31-2016, 02:32 PM   #13
deback
Book E d i t o r
deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.
 
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
There was only one other file that had this problem: Hour Game by Baldacci (in case anyone is interested in this subject and Baldacci...)

I think I fixed the second file, but it was due to a different problem in the toc.ncx file.

Last edited by deback; 01-31-2016 at 02:48 PM.
deback is offline   Reply With Quote
Old 01-31-2016, 03:06 PM   #14
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Well, last I checked, calibre does add pagebreaks at ToC entries, so I guess that isn't too terribly surprising.


That is certainly among the weirdest problems I ever heard. I wonder what people usually think when they try to use the ToC for anything???
eschwartz is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
All pages empty after converting epub in Calibre Apostrophe Conversion 1 01-29-2015 10:08 AM
Blank pages after converting cbr to epub bdoertel Conversion 1 06-05-2014 12:17 AM
Touch Kobo is missing pages after converting from epub poison Kobo Reader 2 12-28-2012 05:43 PM
Converting .pdf to ePub - Pages jumbled. Xyo Workshop 4 07-31-2011 01:15 PM
Images are broken across 2 pages after converting to ePub from RTF. iPhone. vital2k Conversion 2 05-31-2011 01:46 AM


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


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