Home > Computing, OS X, PHP > Creating and transfering pdb ebook files for use on the iphone/ipod touch eReader application

Creating and transfering pdb ebook files for use on the iphone/ipod touch eReader application

August 2nd, 2009 Leave a comment Go to comments

I really love the eReader application on my iPod touch. I think it is the best application that I’ve come across uptill now to read books. But you can’t just drag and drop e-books to your iPhone or iPod touch because apple locks iPhone applications to only their own storage area to store and retrieve data. This is one of the hassles besides converting e-books to the required pdb palm os file format. This is a short post on how to get your e-books from your computer to your eReader application on your iPhone or iPod touch.

The first step is to convert your e-books to the pdb format required by eReader. I use PorDiBle for OS X to convert plain text  (.txt), ms word (.doc), HMTL (.html, .htm) and Rich text (.rtf) formats to .pdb. You can get it here: http://www.loghound.com/pordible/. When installed, just drag & drop the .txt file onto the application icon and it will prompt you to enter the books name. After this the application will convert it to a .pdb file in the same directory and with the same filename as the original. If you want to delete the source file automatically after converting, just open PorBiBle and select preferences from the menu.
But you’ll often have e-books in different formats. For example, the two most important: PDF and microsoft’s lit.
These you’ll have to convert to plain text before you can drop them into PorDiBle. To do that for PDF, just open the file in adobe acrobat reader, and select File>save as text from the menu. To convert lit format to html download a OS X program from this guy: http://hansr.net called lit2html, you can download lit2html here (right click & save as): http://www.hansr.net/Lit2html.dmg. You can drag & drop a lit file to the lit2html application, and it will create a folder containing all components inside the lit file. To convert this e-book to pdb, just drag the .htm file with the title of your book (generally the one with the largest filesize) to PorDiBle.
I’m not aware of any similar applications for windows. If you run windows you’ll have to look for conversion utilities. If you find any good ones, please reply to this post.

Now that you have your .pdb file you are ready to get them to you eReader application. Because the application storage can not be accessed externally you will have to download the e-books from inside the application. To do this you will need to browse to a website, containing links to your books with ereader as protocol. Example: ereader://http://www.somewebsite.com/book.pdb or on a local LAN server: ereader:// You’ll need a web server to do this with your own books. I will not go into the particulars of setting one up on your local machine if you do not have one available. Many, many tutorials exist already for that purpose.
When you have a web server available to you, make sure it supports PHP scripts. I’ve created a PHP script that will automatically create a web page containing eReader links to all files in the directory where the scripts reside. The only thing you will have to do is create a directory on your web server (named ebooks for example) containing this script in a plain text file with the filename “index.php”. You can download the script here (right click, save as): http://weblog.oxidiser.nl/wp-content/uploads/2009/08/index.phps. Just rename the file from index.phps to index.php. You’re all set to download e-books into eReader after you’ve uploaded this file to your directory. The only thing left is drop in your pdb e-book files into this same directory. Just browse to this folder in safari on your iPhone or iPod touch (if you choose the directory e-books in the root of your web server it will be http://yourserver/ebooks). You will get a list with filenames of all the e-books currently in the ebooks folder. When you tap one, it will automatically start the eReader application and download the e-book into it.

That’s it! Now you have your e-book on your device ready to be read!

  1. No comments yet.
  1. No trackbacks yet.