I have an eBook in
.epub file format and I would like to remove the entire first and last pages of the book. How would I go about doing this?
Calibre has had a book editing feature, since version 1.15. If you manage your ebooks in Calibre, just right-click on the book and select "Edit Book".
If you have Calibre installed, but do not use it to manage your books, you can start the editor from the commandline with:
One thing you should note however is that in an EPUB file a "page" depends on the rendering device, the font etc. A page-break can be "inserted", through
page-break-* styles associated with an element, and seem to be enforced through splitting of the HTML within different
.html files of the
.epub as well.
If a section of HTML contains enough text to require rending in multiple pages, it is difficult to speak about something like "removing the first page", as what is exactly contained on the first page is not constant even if the EPUB doesn't change.
The easiest way is to use an ePub editor.
One have have used is Sigil which is free. This allows you to edit the data in the book which is in the HTML format and also control what XHTML pages are in the book. I would guess that the adverts are on separate XHTML pages to the rest and so you only need to edit the contents.