I just suddenly thought, even though this blog is all about creating epubs for ereaders, its actually a bit annoying to have an epub if you don’t have an ereader.  So, I quickly converted the test Poe Two Blackwoods Stories epub into a PDF.

Converting EPUB into PDF is actually a bit harder than it should be.  EPUBs are basically a zip file with the text contained in  XHTML files.  Like any web page there is no exact page layout encoded.  So to create a PDF, the text must be laid out on a standard page format.  One method is to create a CSS file that will add proper layout and formatting to your html, but it takes some tweaking to get it working correctly, and you still need a method to create a PDF from this layout.  Ideally, as a book editor you would simply copy the text into a word processor/publishing program and do the layout by hand to ensure all the page breaks and formatting make sense.

However, I don’t want to spend a bunch of time re-editing this file!

The quickest automated conversion method is to use Calibre’s (free, open-source ebook manager, http://calibre-ebook.com) built-in conversion tool.  However, you have to fiddle around with the settings a lot to get good results, because the converter is aimed at making a custom PDF designed for a specific screen size (i.e. your particular ereader or tablet), not a standard print PDF.

I used a different slightly silly work around:

Using 7-zip (free, open-source archive manager, http://www.7-zip.org) I extracted all the files from the epub (7-zip automatically recognizes epubs as zips).  The actual text will appear inside a directory as XHTML files–in this case, there is one for each “chapter” of the book.  I opened each with Firefox, and printed it as a PDF.  However, I changed the print settings to make the font bigger and add some margins to the page.  This crudely converts the free flowing epub text into a page layout.  Then I took the PDF printout of each chapter and merged them into a single PDF.  Finally, I edited the PDF metadata, just to try to be thorough about everything.

This creates a very basic PDF, basically recreating the look you would have on an ereader.

Since PDF is an accepted format at wordpress.com, I can share it right here:



Leave a Reply

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

WordPress.com Logo

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s