Hi! So after I've converted a book from PDF to EPUB it worked perfectly except for the fact that there are dots on every page break
example:
Code
page 1 ends
.
.
.
.
page 2 starts
I clicked on edit to see what the code looks like and found it looks like this:
Code
<p class="calibre1"><a id="p8"></a><img src="index-8_1.png" class="calibre2"/></p>
<p class="calibre1"><img src="index-8_2.png" class="calibre2"/></p>
<p class="calibre1"><img src="index-8_3.png" class="calibre2"/></p>
<p class="calibre1"><img src="index-8_4.png" class="calibre2"/></p>
So I'm assuming the conversion decided to keep the image files from the pdf that were included with each page break. There are some images in the book that I would like to keep and found that the images from the page breaks are each 100 bytes.
Is there a quick way I could search and delete all of these page break images and lines of code?
Maybe something like:
if a line starts with
Code
<p class="calibre1"><a id="p
delete that whole line and the 3 lines under it.
if that's possible?
Ah, I found a way to fix this. I opened up the epub in 7zip, sorted by size and deleted all the 100 byte images. Then opened it in Calibre's book editor and hit the "Check Book" option (which i'm guessing found all the lines of code referring to images that don't exist anymore and removing them).
Albeit if anyone knows a better solution, like finding and fixing the issue during conversion, would really appreciate it if you'd let me know!
Thanks!
Quote Red_AM
Hi! So after I've converted a book from PDF to EPUB it worked perfectly except for the fact that there are dots on every page break
example:
Code
page 1 ends
.
.
.
.
page 2 starts
I clicked on edit to see what the code looks like and found it looks like this:
Code
<p class="calibre1"><a id="p8"></a><img src="index-8_1.png" class="calibre2"/></p>
<p class="calibre1"><img src="index-8_2.png" class="calibre2"/></p>
<p class="calibre1"><img src="index-8_3.png" class="calibre2"/></p>
<p class="calibre1"><img src="index-8_4.png" class="calibre2"/></p>
So I'm assuming the conversion decided to keep the image files from the pdf that were included with each page break. There are some images in the book that I would like to keep and found that the images from the page breaks are each 100 bytes.
Is there a quick way I could search and delete all of these page break images and lines of code?
Maybe something like:
if a line starts with
Code
<p class="calibre1"><a id="p
delete that whole line and the 3 lines under it.
if that's possible?
Quote Red_AM
Ah, I found a way to fix this. I opened up the epub in 7zip, sorted by size and deleted all the 100 byte images. Then opened it in Calibre's book editor and hit the "Check Book" option (which i'm guessing found all the lines of code referring to images that don't exist anymore and removing them).
Albeit if anyone knows a better solution, like finding and fixing the issue during conversion, would really appreciate it if you'd let me know!
Thanks!
Yes you can fix it during the
conversion possess.
Quote
These options are useful primarily for conversion of PDF documents or OCR conversions, though they can also be used to fix many document specific problems. As an example, some conversions can leaves behind page headers and footers in the text.
But I recommend you become familiar with the calibre ebook editor and its search and replace function.
https://manual.calibre-ebook.com/edit.htmlhttps://manual.calibre-ebook.com/edit.html#search-replaceBookmark or save a local copy of this page of Quick reference for regexp syntaxbernie