![]() |
#1 |
Zealot
![]() Posts: 134
Karma: 68
Join Date: Jul 2012
Device: Kindle
|
epub to mobi fault
I've got an epub file which seems to have every paragraph on a new page. I converted it to mobi in Calibre but it retained the same formatting.
Is this a known problem with an easy solution? |
![]() |
![]() |
![]() |
#2 |
Zealot
![]() Posts: 134
Karma: 68
Join Date: Jul 2012
Device: Kindle
|
I just converted it from epub to RTF and back to mobi and it is not perfect but deffo much better
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,740
Karma: 134321338
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Can you load the ePub into the editor and post some of the code and the CSS?
What eBook is this and where did it come from? I ask in case I can get a hold of it to have a look at it. |
![]() |
![]() |
![]() |
#4 |
Zealot
![]() Posts: 134
Karma: 68
Join Date: Jul 2012
Device: Kindle
|
What part of the code do you want?
I can send you the epub file if there is a way of file transfer on here? |
![]() |
![]() |
![]() |
#5 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,740
Karma: 134321338
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Zealot
![]() Posts: 134
Karma: 68
Join Date: Jul 2012
Device: Kindle
|
This section displays correctly
<?xml version='1.0' encoding='utf-8'?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>A Cottage by the Sea</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <link href="stylesheet.css" type="text/css" rel="stylesheet"/> <link href="page_styles.css" type="text/css" rel="stylesheet"/> </head> <body class="calibre"> <p id="filepos16687" class="calibre13"><span class="italic">Hello!</span></p><p class="calibre13"><span class="italic">A quick thank you from me for picking up A Cottage by the Sea. I do appreciate it and am very lucky to have a band of dedicated readers. Whether you’re a reader who’s been with me since day one or if this is the first book of mine that you’ve tried, I hope this will get you in the mood for your summer holidays.</span></p><p class="calibre13"><span class="italic">Haven’t we all, at some time, wished we could escape to a lovely seaside retreat? I know it’s at the top of my Lottery Win list. I could spend hours on property websites lusting after my very own cottage by the sea.</span></p><p class="calibre13"><span class="italic">I’ve spent years doing long-haul holidays that leave me more exhausted when I return than when I left and have only recently rediscovered the joys of holidaying at home in the UK – although you do have to become an expert at weather-dodging! And, of course, packing for all seasons. No travelling light when you’re going for a week in Wales, though I do highly recommend the beautiful rugged coastal areas of Pembrokeshire as a place to visit. </span></p><p class="calibre13"><span class="italic">I had such a lovely time there doing the research for this book – I’ll definitely be going back.</span></p><p class="calibre13"><span class="italic">I hope that you’ll manage to find some time this year just to kick back and relax with a book or two. I wish you a happy and restful time whether you spend your holiday in Mexico or Margate, Puerto Rico or Pembrokeshire. May the sun shine on you!</span></p><p class="calibre13"><span class="italic">Happy holidays!</span></p><p class="calibre13"><span class="italic">Love Carole </span><img src="images/00002.jpg" class="calibre14"/><span class="italic"> xx</span></p><div class="mbppagebreak" id="calibre_pb_5"></div></body></html> |
![]() |
![]() |
![]() |
#7 |
Zealot
![]() Posts: 134
Karma: 68
Join Date: Jul 2012
Device: Kindle
|
This one does not
<?xml version='1.0' encoding='utf-8'?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>A Cottage by the Sea</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <link href="stylesheet.css" type="text/css" rel="stylesheet"/> <link href="page_styles.css" type="text/css" rel="stylesheet"/> </head> <body class="calibre"> <p id="filepos18565" class="calibre4" style="margin:0pt; border:0pt; height:1em">*</p><p class="calibre2"><span class="calibre3">Chapter One</span></p><p class="calibre2"><img src="images/00001.jpg" class="calibre15"/></p><p class="calibre16">‘<span class="italic">Destination</span>,’ the dulcet tones of the sat nav announces. ‘<span class="italic">Destination</span>.’</p><div class="mbppagebreak" id="calibre_pb_6"></div></body></html> |
![]() |
![]() |
![]() |
#8 |
Zealot
![]() Posts: 134
Karma: 68
Join Date: Jul 2012
Device: Kindle
|
This is the entire stylesheet
.bold { font-weight: bold } .calibre { display: block; font-size: 1em; margin-bottom: 0; margin-left: 5pt; margin-right: 5pt; margin-top: 0; padding-left: 0; padding-right: 0; text-align: justify } .calibre1 { display: block; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; text-indent: 0 } .calibre10 { display: block; list-style-type: disc; margin-bottom: 1em; margin-right: 0; margin-top: 1em; text-indent: 0 } .calibre11 { display: list-item; margin-top: 0; text-indent: 0 } .calibre12 { display: list-item; margin-top: 8pt; text-indent: 0 } .calibre13 { display: block; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 1em; text-align: left; text-indent: 0 } .calibre14 { height: 37px; vertical-align: baseline; width: 37px } .calibre15 { height: 123px; vertical-align: baseline; width: 140px } .calibre16 { display: block; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 3em; text-align: justify; text-indent: 0 } .calibre17 { display: block; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 1em; text-align: justify; text-indent: 1em } .calibre18 { display: block; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 1em; text-align: justify; text-indent: 0 } .calibre19 { display: block; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 2em; text-align: justify; text-indent: 0 } .calibre2 { display: block; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 2em; text-align: center; text-indent: 0 } .calibre20 { height: 600px; vertical-align: baseline; width: 379px } .calibre3 { font-size: 1.29167em; line-height: 1.2 } .calibre4 { display: block } .calibre5 { display: block; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 1em; text-align: center; text-indent: 0 } .calibre6 { display: block; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 1em; text-indent: 0 } .calibre7 { font-size: 0.625em } .calibre8 { font-size: 1.83333em; line-height: 1.2 } .calibre9 { display: block; height: 1em } .italic { font-style: italic } .mbppagebreak { display: block; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0 } |
![]() |
![]() |
![]() |
#9 |
Zealot
![]() Posts: 134
Karma: 68
Join Date: Jul 2012
Device: Kindle
|
I've had some more success by converting to docx, then taking out all paragraph breaks and converting to Mobi. Only problem is now the chapter breaks have gone.
![]() |
![]() |
![]() |
![]() |
#10 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,740
Karma: 134321338
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
After looking at this eBook, we cannot help you with your problem because this is an eBook that violates copyright because it's been pirated.
|
![]() |
![]() |
![]() |
#11 |
Zealot
![]() Posts: 134
Karma: 68
Join Date: Jul 2012
Device: Kindle
|
Fair enough.
|
![]() |
![]() |
![]() |
#12 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Code:
<div class="mbppagebreak" id="calibre_pb_5"></div> What you'll want to do is merge all HTML files together, then manually split them where you want (before every chapter). 1. In Calibre's Editor: Highlight multiple files, then Right-Click + "Merge Selected Text Files". 2. Press Ctrl+F and make sure Mode is set to "Regex". 3. Search: <div class="mbppagebreak" id="calibre_pb_\d+"></div> Replace: ***LEAVE COMPLETELY BLANK*** This will remove all the mbppagebreaks from your code. 4. Follow: https://manual.calibre-ebook.com/edi...ing-html-files to split each chapter into its own file. 5 (Optional). Rename all your files to human-readable names such as: - Foreword.xhtml - Introduction.xhtml - Chapter01.xhtml - Chapter99.xhtml Last edited by Tex2002ans; 03-23-2021 at 06:33 PM. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
18MB EPUB converts to 40MB Mobi! What can I do to reduce Mobi file size? | perdman | Conversion | 11 | 12-09-2017 04:18 AM |
PDF to MOBI and EPUB to MOBI | bob-e-reader | Kindle Formats | 2 | 06-08-2015 05:47 AM |
mobi > epub > mobi = changed line spacing? | SampleAndy | Conversion | 3 | 03-01-2013 06:18 PM |
Conversion from mobi (to mobi, or epub) breaks internal links | bounder | Conversion | 1 | 10-09-2012 11:56 AM |
Is the epub-mobi/mobi-epub convertion "lossless"? | tanteoma | Calibre | 14 | 06-07-2012 10:57 AM |