Edit ePub eBooks with Your Favorite HTML Editor

Posted by Matthew Guay on How to geek See other posts from How to geek or by Matthew Guay
Published on Mon, 14 Jun 2010 18:00:00 +0000 Indexed on 2010/06/14 18:13 UTC
Read the original article Hit count: 724

Filed under:

ePub eBooks are increasingly popular today, but often they’ve been made by converting other file formats. Here’s how you can edit ePub books to remove irregularities and make them better for reading on your devices.

ePub’s are actually a zip file containing images, XHTML files with your text, and more with the .epub extension. You can make them better by editing the XHTML files directly.  Code gurus can edit the code directly, but even if you’ve never edited HTML, you can still quickly make changes with a WYSIWYG editor.

Extract the Files from your ePub eBook

As mentioned before, ePub files are actually renamed zip files.  So first let’s get all of the files in your ePub eBook accessible.  Find an eBook you want to edit and then change the file extension to .zip.

image

If you don’t see the file extensions, click Organize in the menu bar and select Folder and search options.

image

Select the View tab, and then uncheck the box beside Hide extensions for known file types.  Click Ok, and then change the file type as above.

image

Windows will warn you about changing the file type; click Yes to proceed.

image

Now you can browse the files of the ePub file.  Notice that it contains mostly HTML or XHTML files and images.  Click Extract all files to save them all in a folder so you can easily edit them.

image

Alternately, you can open the ePub file directly in your favorite file archival program such as 7-zip.  Browse to the location of your ePub file, double-click it, and it’ll automatically open even if you don’t change the file extension to zip.  Now you can extract the folder, or extract individual files as before.

sshot-2010-06-11-[23-25-08] 

Edit Your eBook in KompoZer

The actual ebook contents are stored in HTML or XHTML files.  These may be stored on the top folder of you ePub file’s directory, or they may be stored in \OEBPS\text in the file.

image

To change the contents of your eBook, you’ll want to edit these files.  Often there may be separate files for each chapter, so you may have to use trial and error to find the one you need to edit.  You could edit them by hand in Windows using Notepad if you don’t have an HTML editor installed.

image

A better option would be to use an HTML editor.  Here we’ll use the free KompoZer program to edit the files just like we’d edit a document in Word.

Download KompoZer (link below), and unzip the files.  Then open the new folder and launch kompozer.exe; you don’t even need to install it.  In fact, you could even store KompoZer on a flash drive so you could edit HTML files from any computer.

image

In KompoZer, open the HTML or XHTML file from your eBook that you want to edit.

image

Now you can edit the file just like you would edit a document in Word.  Remove extra and unneeded text, make titles stand out, correct misspellings … anything you want!  This is especially helpful if your ePub file was created by converting a PDF as these often have many small errors.

image

Or, if you’d rather edit the code itself, select the Source tab and edit as you wish.

image

When you’re done making the changes, make sure to save the file in the same location with the same file name.

image

Recreate Your Edited ePub eBook

Once you’ve made all the changes you wanted, it’s time to turn this folder of files back into ePub.  Make sure you change the name of the folder if it still has the same name as the original ePub or zip file so you don’t mix them up or have trouble with overwriting the old files.

Zip the folder using Windows Explorer or your favorite archival utility.  If you are using another archival program, make sure to compress it as a zip folder; other compression methods will render the ePub unreadable by your eReader app.

image

Now change the file extension again, this time back to .epub. Now you can read your eBook with your changes in your favorite reader program or app on your mobile device.

image

Conclusion

Whether you need to remove an odd, misplaced character or need to do fine editing, using an HTML editor is a great way to make your ePub eBooks look just like you want.  Also, with an editor like KompoZer it’s not even difficult.

Download KompoZer


Got an opinion to share? Click here to join the discussion

Similar Articles Productive Geek Tips
Latest Software Reviews Tinyhacker Random Tips


© How to geek or respective owner

Related posts about eBook