When you start researching online how to publish an eBook, the focus is strongly on commercial release to the general public.
However, particularly in the corporate world, you may not want to make your book publically available. So how do you get all the benefits of an eBook on the iPad (and/or the excuse to buy an iPad for business use) but without releasing your internal documents to the world? After some research, trial and error, the process is really quite simple.
To have your very own library on your very own iPad just three steps are required:
- create a valid eBook
- drag that book into iTunes, and
- synchronise your iPad with your updated iTunes library.
Your personal eBook will then be available on your iPad, right there alongside, and indistinguishable in quality, your John Grisham collection. Or your Alice in Wonderland collection if still stuck in a region – like here in Australia – with no functioning iBooks store.
Step 1. Create a valid eBook
While this may appear daunting it’s really straightforward once you realise a few simple truths.
- iBooks supports eBooks produced in the standard ePub format (read more on Wikipedia)
- an ePub book is simple a zipped folder with a different extension (changes .zip to .epub)
- within your eBook your content must be included as XHTML files, one file per chapter
- accompanying your content are a variety of XML files that define the structure and order of your content
And that’s it. You don’t need anything more complicated than a text editor and a folder zipping tool. It’s so simple I strongly recommend you (at least the first time) build one manually. It’ll give you a much better understanding of how it all comes together, and what options you have in defining and manipulating your content.
If your experience is the same as mine, most of the issues you’ll face when generating your first book will be in producing valid XHTML content. As such it’s recommended you build and validate this first. Issues I had included:
- incorrect nesting of tags
- not closing tags (particularly the img and br items)
- missing attributes (particularly alt on all my images)
However use a decent XHTML validator (if not using Safari – which tests automagically – go for the master and use the one from W3C) and you’ll get through them.
Outside the XHTML the only other issue was in ensuring all the content files were encoded correctly:
On the Mac I was using BBEdit. It gives you an option in the Edit Window to set the encoding: pick UTF-8. Note I also picked Windows CRLF because I was using a PC to package the book, more on that later.
On the PC I was using Notepad to edit. It allows you to set the encoding when saving. Again, choose UTF-8.
Once all your content is complete and valid, you can then compile your book in the folder you’ll then zip and rename to become the finished ePub. Follow the instructions (and sample) from jedisaber:
- ignore mimetype and META-INF (content does not need to change from one book to the next)
- load your valid content into OPS folder, documents and images (use subdirectory for your images if you set the URLs in your content to match)
- edit content.opf (XML file) to list all your content (and only your content – remove references to sample files not used). Make sure the URLs are correct, particularly if using subdirectories in OPS to organise your content
- edit toc.ncx (XML file) to list your content in the order to be navigated and with the section/chapter titles as you want them to be shown
- ZIP the folder
- Rename the folder from a .ZIP extension to a .ePUB extension
Be careful generating the ZIP version on a Mac using the built in compression tool. Not only does this incorporate all the hidden OSX files (DS_Store, etc) it also seems to put an extra folder layer in. I was only able to generate the correctly formatted ZIP file using Winzip on a PC. This also allowed me to set the compression for the mimetype file to 0% as requested.
Note I managed to resolve the “extra folder” issue in OSX. Trick is not to choose your eBook folder to compress. Instead select the contents of that folder (should be three things: mimetype and META-INF and OEBPS folders) and compress them. You’ll get an Archive.Zip file you can then rename. This doesn’t resolve the potential issue with hidden files but I’ve not had any issues with ePUBs built this way since.
I then suggest you validate the eBook prior to the move into iTunes. Use the online threepress tool – it’s free. It may identify a few items you’ll need to return to your source to resolve. Just make the edits, rebuild/rename the ZIP and try again.
With that tool the only error I was not able to get rid of concerned the length of the first filename. I’m guessing this is because the requirement is for mimetype to be the first file in the ZIP file but I could not find any way to enforce this. However even with this error I did not get any issues with the subsequent steps so if you get this error, ignore it like I did.
If the book validates, then also consider testing it in a reader outside of iTunes. I used the bookworm from O’Reilly. Alternatively try Adobe Digital Editions, a free download so you can test your books without a web connection.
Step 2. Drag into iTunes
Simply open iTunes, select your Books folder, and drag your .epub file into the window. If all works well you should see your book listed, with its cover appearing in all its glory.
Note you cannot open/view/test the book from here. That only happens when you get it onto the iPad.
Step 3. Synchronise and launch on your iPad
When you sync your iPad just ensure its set to include all new eBooks. Your file will then get copied across and be ready for use. Congratulations!
Using XHTML it’s straightforward to include text and images in your content. So feel free to improve on your content’s richness. Also consider adding a stylesheet (include in your content.opf file, as well as referenced in your XHTML) to further enhance the presentation.
You can easily add a nicer title/cover page so your book looks better on the shelf. Either build in XHTML or just create as a nice image and include.
From this foundation, the next step for me is to see if possible to include some richer media in the book. For example a video or audio snippet. We’ll see how that goes….
- ePub description: htpp://en.wikipedia.org/wiki/EPUB
- Tutorial on building an eBook: http://www.jedisaber.com/eBooks/tutorial.asp
- Sample/Template ePub project: http://www.jedisaber.com/eBooks/books/sample.epub
- Online XHTML validator: http://validator.w3.org
- Online ePub validator: http://www.threepress.org/document/epub-validate/
- ePub viewers: http://bookworm.oreilly.com (online, registration required), or Adobe Digital Editions (download, registration required)
Note: All the online tools listed here require you to upload your content to their servers. Be mindful of how secure you want/need your content to remain before using any of these tools.