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 11-15-2022, 08:21 AM   #1
LostOnTheLine
Connoisseur
LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.
 
Posts: 71
Karma: 800000
Join Date: Jun 2021
Device: Kindle Paperwhite (PW1|PW3|PW4), Kindle Voyage
Blank Pages that aren't blank How do I remove them in a conversion?

I have a number of files that are fan-done translations or fanfiction that I get in ePub format

The files always seem to include 1 or 2 pages at the very least that are blank, usually between chapters or after images.

I never read them in ePub so I don't mind if the ePub stays the way it is, actually, I think, that's preferable as it's the original. I always convert to KFX or AZW3 as I read on a Kindle Paperwhite 3. But this means I'm constantly having to [Next Page] twice which gets annoying after awhile.

I have a few set things that I automatically Search & Replace for every conversion already like " and " to " & " & "in and out of itself" to "in & of itself" & "have a cake & eat a cake" to "have a cake & eat it too" because I run into those a lot. So I thought adding another would be no big deal. But this one I can't seem to find a way to make it work

It doesn't help that some of the pages are truly blank while others are "blank" but have 1, 3, or even 5 in one case, line breaks on the page. But I can't find anything that works on any of them at all.


Is there a way to:
  • Make a search & replace that replaces blank pages?
  • Or one that deletes any pages that have nothing but line breaks?
  • Or maybe a way to do a search that includes a page break & a line break?
  • If I can do just the blank pages is there a way to search for 3 line breaks in a row? I don't mind making a separate search for 3 & 5 though the ones with only 1 I'll just have to deal with but if that's the best I can get, I'm willing to suffer on just a few if it means I can get rid of the rest.
  • I've looked through the conversion options & settings but there's always a chance I missed something. Is there an option somewhere to remove blank pages? I know there's one to remove blank lines between paragraphs.

Most of the pages in question I discovered have a non-breaking space at the top

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>end</title>
</head>
<body>
<p> </p>
</body>
</html>
It seems that it doesn't let me include the NBSP in code, it's the one that looks like "&" "#" "160" ";" all together

while many have a break, some have it with an alignment tag
Code:
<p style="text-align: right;"><br/></p>
if that makes any difference.

I've tried converting ePub to ePub to see if I can get it to work & nothing I've tried so far has been successful.

Can anyone help?
LostOnTheLine is offline   Reply With Quote
Old 11-15-2022, 10:18 AM   #2
retiredbiker
Addict
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: 387
Karma: 1638210
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Jutoh, Kobo Forma
There are so many possibilities for this behaviour that you will blow your brains out trying to solve it all at conversion time.

It looks like you have already been in the Editor to see the code. Fix it there with search and replace. With each book you can see exactly what the offending lines are and blow them away. With a little practice it will only take a couple of minutes to fix a book.

After a few books you will almost certainly find repeating patterns...you can save searches for later use, and even edit a saved search on the fly for minor changes.
retiredbiker is offline   Reply With Quote
Advert
Old 11-15-2022, 11:12 AM   #3
LostOnTheLine
Connoisseur
LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.
 
Posts: 71
Karma: 800000
Join Date: Jun 2021
Device: Kindle Paperwhite (PW1|PW3|PW4), Kindle Voyage
Quote:
Originally Posted by retiredbiker View Post
There are so many possibilities for this behaviour that you will blow your brains out trying to solve it all at conversion time.

It looks like you have already been in the Editor to see the code. Fix it there with search and replace. With each book you can see exactly what the offending lines are and blow them away. With a little practice it will only take a couple of minutes to fix a book.

After a few books you will almost certainly find repeating patterns...you can save searches for later use, and even edit a saved search on the fly for minor changes.
But I have nearly a hundred ePubs with this problem. manually editing each one is too much. & I'll be getting more all the time with the same problem.

I have a few patterns that I have found, but they all involve new lines. Some have the same page title repeated a few times & the ones that are `</br></br></br>` are usually the same for books done by the same person/group or by the same author.
In fact there are a bunch of them where there is one right after the ToC that is the same name `start.xhtml` & has the same title repeatedly.
BUT... I can't find a way to search for them. If I'm manually editing each one I could just delete the page. But that still means opening up & editing each file & then doing it each time I get a new one, & I'd much rather leave the original as it is if at all possible. If not I can always create a separate backup of each one, but that seems like it shouldn't be necessary, since I can't think of any sort of automated solution that would require altering the original. I specifically stated that because I don't need the original altered & that should prevent options not being suggested because the original would "still be a problem".
I already use the Search & Replace by default, without even thinking about it, there should be a way to do the same, I'm just not sure how to do it.

Last edited by LostOnTheLine; 11-16-2022 at 01:31 AM. Reason: Adding details to prevent "solutions" that don't solve the problem
LostOnTheLine is offline   Reply With Quote
Old 11-17-2022, 04:42 AM   #4
LostOnTheLine
Connoisseur
LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.LostOnTheLine ought to be getting tired of karma fortunes by now.
 
Posts: 71
Karma: 800000
Join Date: Jun 2021
Device: Kindle Paperwhite (PW1|PW3|PW4), Kindle Voyage
I've discovered a bunch that are the same exact file name. For these ones every one in the group has has the same `Section0001.xhtml`, `Section0002.xhtml`, `Section0003.xhtml` after each chapter which is a blank page. Is there a way to remove all pages with a title in an automated way that doesn't require each to be edited individually?
I know `Section0001` is probably a legitimate page in other books, but there's also a few that seem to have a similar pattern for blank pages after pictures `Insert1_1.xhtml`, etc & the images in all the ones done by that translator are all Insert1, Insert2, Insert3, Insert4, etc. So I can be pretty confident that `Insert1_1.xhtml`, `Insert2_1.xhtml`, `Insert3_1.xhtml` are all going to be blank pages. & I'll be sure to keep a backup of the original in any case until I've confirmed there isn't a problem. Is that possible?

Last edited by LostOnTheLine; 11-17-2022 at 09:11 PM.
LostOnTheLine is offline   Reply With Quote
Reply

Tags
blank page, convert, search & replace


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove blank pages Gunivortus Sigil 20 05-22-2022 07:01 PM
Calibre adding blank pages before and after KFX conversion morty92222 Conversion 16 05-21-2021 11:04 AM
Blank Pages EPUB Conversion C_Gordon Conversion 3 04-19-2020 08:59 AM
From kindle file to PDF conversion Blank pages alternately appear taizo PDF 0 01-29-2018 08:10 PM
Troubleshooting one after another blank pages monsterbadgog Amazon Kindle 0 02-20-2011 04:02 PM


All times are GMT -4. The time now is 09:22 PM.


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