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 12-26-2020, 07:11 PM   #1
Poltem
Member
Poltem began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Dec 2020
Device: none
Removing blank pages and page breaks added in a converted Epub

I did a docx to Epub conversion, and I found many blank pages and page jumps in the converted file. The docx source had been cleaned of all page and section breaks. Could anyone tell me how to get rid of these unwanted pages and page breaks? Thanks.
Poltem is offline   Reply With Quote
Old 12-26-2020, 08:32 PM   #2
retiredbiker
Evangelist
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 448
Karma: 3886916
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Jutoh, Kobo Forma
If you are doing your formatting using the toolbar instead of paragraph styles in Word (or any other word processor package), your behind-the-scenes code is likely to be a supreme mess when converted to html in the epub. There is no way to fix this with a conversion. You either have to use styles exclusively in the source document, or edit the epub later to fix it.

And some word processor items (tabs, most auto-numbered lists, etc.) either are ignored or not allowed in html, so they can cause very strange things in conversion.

There are also settings in the Calibre conversion that might cause what you describe; for example try turning off all structure detection and see how it looks.
retiredbiker is offline   Reply With Quote
Advert
Old 12-27-2020, 03:54 PM   #3
Poltem
Member
Poltem began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Dec 2020
Device: none
Thank you for your prompt response. My source docx uses styles exclusively, therefore, I guess that I need to look for a solution in the Structure Detection area, but first I need to figure out how to turn off structure detection. I must tell you I am a beginner. Thank you for your kind assistance.
Poltem is offline   Reply With Quote
Old 12-27-2020, 10:48 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,258
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://www.mobileread.com/forums/sh...d.php?t=186697
kovidgoyal is offline   Reply With Quote
Old 12-28-2020, 08:37 PM   #5
Poltem
Member
Poltem began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Dec 2020
Device: none
I could figure out how to solve this problem, but then another one appeared. All my chapters were removed from the epub, and now, they are stored in the file browser under Miscellaneous. I deleted the calibre_bookmarks.txt file, as per instructions I found in the forum, then I saved and closed everything. Then, I reopened, but calibre_bookmarks.txt is still there. Could you, please tell me what I should do to recover my chapters and prevent this from happening again?
Poltem is offline   Reply With Quote
Advert
Old 12-29-2020, 02:53 AM   #6
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 Poltem View Post
I could figure out how to solve this problem, but then another one appeared. All my chapters were removed from the epub, and now, they are stored in the file browser under Miscellaneous. I deleted the calibre_bookmarks.txt file, as per instructions I found in the forum, then I saved and closed everything. Then, I reopened, but calibre_bookmarks.txt is still there. Could you, please tell me what I should do to recover my chapters and prevent this from happening again?
Run the Check Book tool and then choose to append the files (under Miscellaneous) to the rest of the files (however it's worded in the box on the right side of the Check Book window). This will move those files back up to the top left window. You will probably have to drag the appended files to where they belong in the list of html files.
deback is offline   Reply With Quote
Old 12-29-2020, 02:58 AM   #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 Poltem View Post
I did a docx to Epub conversion, and I found many blank pages and page jumps in the converted file. The docx source had been cleaned of all page and section breaks. Could anyone tell me how to get rid of these unwanted pages and page breaks? Thanks.

Check the margins for the applicable classes in the CSS file to make sure the bottom margin is not resulting in added blank space at the end of each html file.

Also, check the applicable classes in the CSS file for any "height" lines, which I've seen cause page breaks. When this happens, I usually delete the height line(s) in the CSS file.
deback is offline   Reply With Quote
Old 12-29-2020, 05:08 PM   #8
Poltem
Member
Poltem began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Dec 2020
Device: none
Quote:
Originally Posted by deback View Post
Run the Check Book tool and then choose to append the files (under Miscellaneous) to the rest of the files (however it's worded in the box on the right side of the Check Book window). This will move those files back up to the top left window. You will probably have to drag the appended files to where they belong in the list of html files.
Thank you so much! I ran the check book and found that my chapters had an illegal character. I changed it, and all the chapters returned to their place. Thank you again.
Poltem is offline   Reply With Quote
Old 12-29-2020, 05:11 PM   #9
Poltem
Member
Poltem began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Dec 2020
Device: none
Quote:
Originally Posted by deback View Post
Check the margins for the applicable classes in the CSS file to make sure the bottom margin is not resulting in added blank space at the end of each html file.

Also, check the applicable classes in the CSS file for any "height" lines, which I've seen cause page breaks. When this happens, I usually delete the height line(s) in the CSS file.
I tried all this to no avail, but the weird thing is that when I convert the epub to Mobi, the problem disappears. Thxs
Poltem is offline   Reply With Quote
Old 12-29-2020, 08:44 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
Quote:
Originally Posted by Poltem View Post
I tried all this to no avail, but the weird thing is that when I convert the epub to Mobi, the problem disappears. Thxs
If I could see two of the pages (before and after the blank page) and your CSS file, I'm sure I could find the problem. Can you copy and paste the portion of the CSS file for the last class on one page and the first class on the next page?

Last edited by deback; 12-29-2020 at 08:47 PM.
deback is offline   Reply With Quote
Old 12-30-2020, 12:20 PM   #11
Poltem
Member
Poltem began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Dec 2020
Device: none
Quote:
Originally Posted by deback View Post
If I could see two of the pages (before and after the blank page) and your CSS file, I'm sure I could find the problem. Can you copy and paste the portion of the CSS file for the last class on one page and the first class on the next page?
Here it is! I also noticed that 2 blank pages are added when I split a file.

END OF PAGE BEFORE:
class="text_56"> </span><span class="text_">possession,</span><span class="text_56"> </span><span class="text_">until the</span><span class="text_2"> </span><span class="text_">sublime</span><span class="text_2"> </span><span class="text_3">moment</span><span class="text_2"> </span><span class="text_">when</span><span class="text_2"> </span><span class="text_3">you’ll</span><span class="text_2"> </span><span class="text_">be</span><span class="text_2"> </span><span class="text_">admitted</span><span class="text_2"> </span><span class="text_">into</span><span class="text_8"> </span><span class="text_">his</span><span class="text_2"> </span><span class="text_">presence.</span></p>

</body>

</html>




BEGINNING OF PAGE AFTER:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
<title>ABC 6x9.indd</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
<link rel="stylesheet" type="text/css" href="page_styles.css"/>
</head>

<body class="calibre">

<h3 class="block_15" id="toc_id_45">Where to Start</h3>

<p class="block_14"><span class="text_">So, your decision is </span><span class="text_3">made. </span><span class="text_1">You </span><span class="text_">are determined to begin the journey that will </span><span class="text_3">lead you </span><span class="text_">to sanctification, an essential step </span><span class="text_3">for </span><span class="text_">those </span><span class="text_3">who </span><span class="text_">want to get closer to God. The effort is within your reach. Each one progresses according to </span><span class="text_20">his </span><span class="text_">own means, level of</span><span class="text_19"> </span><span class="text_">education,</span><span class="text_19"> </span><span

Thank you!
Poltem is offline   Reply With Quote
Old 12-30-2020, 12:25 PM   #12
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: 45,500
Karma: 168929301
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
That is some of the ugliest CSS I've seen outside of fixed layout epub3 files.

However, could you also post the stylesheet.css file? Rename it as stylesheet.css.txt and use the attach tool (paper clip in the top line or Attach files in the additional options.

Or what might be easier is to simply attach the whole epub file if it is not copyrighted, confidential information, etc.

One question out of curiosity. The title seems to indicate that this file was originally generated in Adobe's InDesign so why convert to docx and then to epub?
DNSB is offline   Reply With Quote
Old 12-30-2020, 05:13 PM   #13
Poltem
Member
Poltem began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Dec 2020
Device: none
Quote:
Originally Posted by DNSB View Post
That is some of the ugliest CSS I've seen outside of fixed layout epub3 files.

However, could you also post the stylesheet.css file? Rename it as stylesheet.css.txt and use the attach tool (paper clip in the top line or Attach files in the additional options.

Or what might be easier is to simply attach the whole epub file if it is not copyrighted, confidential information, etc.

One question out of curiosity. The title seems to indicate that this file was originally generated in Adobe's InDesign so why convert to docx and then to epub?
Here is the file!
Your statement is very encouraging . It means that there's still hope.
As for the title, I really don't know where it comes from. This manuscript was generated in Word, not in Indesign.
Thank you!
Attached Files
File Type: txt Stylesheet.txt (16.6 KB, 166 views)
Poltem is offline   Reply With Quote
Old 12-30-2020, 06:59 PM   #14
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,672
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Poltem View Post
Here is the file!
Your statement is very encouraging . It means that there's still hope.
As for the title, I really don't know where it comes from. This manuscript was generated in Word, not in Indesign.
Thank you!
Generated from what?

Word requires fingers on keys or a file to read.

Manuscript was possibly created in InDesign, saved as PDF, and that was read into Word and saved as DOCX.

Recent editions of Word can read PDFs. If the PDF was created in a WP program it may convert well, but if it was created in a DTP program it probably won't.

BR
BetterRed is online now   Reply With Quote
Old 12-30-2020, 08:21 PM   #15
Poltem
Member
Poltem began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Dec 2020
Device: none
Quote:
Originally Posted by BetterRed View Post
Generated from what?

Word requires fingers on keys or a file to read.

Manuscript was possibly created in InDesign, saved as PDF, and that was read into Word and saved as DOCX.

Recent editions of Word can read PDFs. If the PDF was created in a WP program it may convert well, but if it was created in a DTP program it probably won't.

BR
No! This manuscript was entirely created in MS Word, from A to Z, with my fingers on keyboard. Then, the docx file was converted to Epub with Calibre. It was never saved in PDF.
I used, though, a modified copy of the docx file in Indesign, to generate a print book.
Poltem is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove blank page added after image page crowwoods1 Editor 5 09-19-2020 01:21 AM
Blank pages (every other page) PDF to EPUB DWC121 Conversion 6 12-27-2019 04:32 PM
Removing page breaks rolgiati Conversion 0 01-15-2013 08:53 AM
Blank pages before chapter breaks on iPad? AlexBell Conversion 8 01-06-2012 09:49 AM


All times are GMT -4. The time now is 04:03 AM.


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