Converting Your WordPress Blog to an eBook (Part 3)

In our last post we downloaded an export of your blog posts and converted them to an HTML file, with your images stored in a separate folder. Today we’ll be adding a table of contents, shrinking down your image files for eReaders, and converting your book to an eBook format. We’ll be using XnView and Calibre today (you can get the download links from this post), as well as Microsoft Word (2007).

Shrinking Pictures

Most eReaders have a fairly small pixel width (often less than 600 pixels) and can have restrictions on the file size of each image. Ultimately, you’ll need to test your finished eBook on your target device to make sure it works, but here are a few tips for using XnView to greatly reduce the size of your eBook.

Step One: Open up XnView and select “Tools–>Batch Processing…


Step Two: Click “Add Folder” and browser to the folder you created when you saved your HTML file (something like [your_blog_name]_files). Click “OK” and this will add every image in that folder to your batch processing job.


Step Three: You’ll want to select a different output folder than your source folder for your shrunk images. Also, be sure to check “Keep source format“, as the HTML file you created is expecting a specific graphic extension for each file (JPG, GIF, PNG, etc.)


Step Four: Click the “Transformations” Tab, Select “Resize” and Click “Add >” to add this to your list of batch processes.


Step Five: Put 600 (or smaller) as the value for the target width and height, check the box marked “Keep Ratio” and check only “decrease“. Make sure all other boxes are unchecked (click on image above for details of how yours should look).

Step Six: (Optional) Select “Set DPI” and Click “Add >“. Set X and Y DPI to 72 (or less). This will reduce the dots per inch on your image, and may result in a smaller file size.


Step Seven: Click “Go” to start the resizing. Once complete, copy all files into your source folder “[your_blog_name]_files” overwriting the originals. In my case this took 39.7 MB down to 16.1 MB, so it’s worth looking into.


You may see another screen if you have any GIF files. Just click “OK” to continue converting.


Adding a Table of Contents

If you’ve got something on the order of 100+ posts for the year, then you need a table of contents so people can find the posts they love.

Step One: Open your HTML file (the one you saved as a complete webpage), in Microsoft Word. You can edit the text of the file just like a normal document. When creating the table of contents make sure your cursor is at the top-most and left-most position (otherwise known as the beginning of the document).

Step Two: Click the “References” tab and click on the button on the left that says “Table of Contents“. Select the option called “Insert Table Of Contents


Step Three: Uncheck the box that says “Show Page Numbers” and check the box for “Use Hyperlinks Instead of Page Numbers“. Set the number of levels to show to 1 or 2. Click “OK“.


Step Four: Your table of contents is now created. If you delete a post or edit the text, you’ll need to delete the currently created table of contents and repeat Steps 1-3 to update it.


Step Five: When you’re done, Click “File–>Save As–>Other Formats“.


Step Six: Save your updated file as “Web Page, Filtered“.


You may get a warning about Office formatting. Click “Yes“.


Convert Book In Calibre

We’re almost done, just need to convert the book into its final format.

Note: Many services, including Amazon Direct Publishing, will handle the conversion when you create the book, but it’s a good idea to test how the book will look and operate on the devices you intend to sell it on. You can also use this method if you intend to distribute the book yourself DRM free…

Step One: Open Calibre. Calibre’s library supports a drag and drop add (select the HTML file and drag into the Calibre window), or you can add the book to the library by clicking “Add Books“. Your book will be added as a ZIP file (a compressed folder containing your HTML file and all images).

Step Two: Edit the metadata (information about the book), by clicking the “Edit Metadata” button. Here you can specify your title, author, upload a cover, etc.


Step Three: You can convert your book by clicking the “Convert” button. The output format is specified at the top left, and you can make any last changes to metadata on this screen as well.


Step Four: Conversion will take a while so be patient, but when you’re done you’ll have a fully fledged eBook which you can send to any plugged in device by clicking “Send To Device”. Calibre will usually store your library in the “Documents” folder, or inside its own directory if you’re using the portable version. The individual MOBI or EPUB file is all you’ll need to have your book.



Well, it’s been a long journey but I hope it was worth it. If nothing else you’ll have an artifact of all your hard work in the last year, and maybe something you can share with others. Any comments / questions?

I’m thinking of putting these posts up as a free guide. Anybody interested?



Filed under Books + Publishing, Internal Debate 42, Trube On Tech, Writing

7 responses to “Converting Your WordPress Blog to an eBook (Part 3)

  1. Thank you for these posts! I have found them very helpful. I’m sure others would appreciate them as a free guide also – I know I would! Thanks !

    • I’m working on it and hope to have it up on Smashwords (with some expanded and more detailed content) in a little while (not sure what that means but it sounds good doesn’t it?). Glad these posts were helpful!

  2. Oh, super posts. I’m totally inept, so I love the step by step. 🙂

  3. This is fantastic, thank you so much for the step-by-step tutorial! I’ve been wanting to convert a portion of my blog to an eBook, mostly for my own enjoyment, but also so I don’t lose all that writing I put out there. This helps immensely!

    • I understand the not wanting to lose the content angle. I’ve been writing for a year on this blog and it turns out to be something like 50000+ words. I’d hate for an EMP (or a server crash) to kill my work. Even if it’s just for yourself, the eBook is a nice way to preserve your writing. Glad to help!

  4. Pingback: Contents of the highest Calibre | [BTW] : Ben Trube, Writer

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s