... unless you decrypt them first.
(Warning: decrypting a DRM-protected e-book, thereby removing copy protection and other forms of access control, is a violation of the law ... even if the decrypted copy is never shared with others. Sorry about that.)
eReader2html is a Python script that does exactly that. You can view and download the eReader2html Python script here. Then you can use it on your Mac OS X platform — as well as on Windows and other platforms — to turn your PDBs into HTML files. (My platform is Mac OS X 10.5.8 "Leopard.")
You can then read the HTML version in any web browser ... or you can use calibre to turn it into an EPUB for use in iBooks. More on calibre later.
Don't know how to read Python code? Never mind ... just click on the Download button. Your browser (mine is Safari) will put the downloaded script file into whatever folder it is set to put downloads into, using the filename f1fc790cb.txt. If, for you, the folder does not land on the Desktop, you should move the downloaded file manually to the Desktop. Then, for comprehensibility, you should click on the f1fc790cb filename and change it to eReader2html. (The original filename extension, .txt, remains.)
Now open Terminal (it's in the Utilities folder) and type the command python, followed by a space. Drag the icon of the eReader2html.txt file into the Terminal window and hit Return. You should see something like:
iMac:~ eric$ python ~/Desktop/eReader2html.txt
eReader2Html v0.03. Copyright (c) 2008 The Dark Reverser
Converts eReader books to HTML
ereader2html infile.pdb outdir "your name" credit_card_number
It's enough to enter the last 8 digits of the credit card number
If you get an error message indicating that the python command is unknown, you probably need to install the Python interpreter. Make sure the optionally installed Apple Developer package is present on your Mac.
If you already, at the outermost root level of your Mac's folder hierarchy, have a folder called Developer, you're fine — and something else must be wrong. Post a comment to this blog entry, and I'll try to help you.
If Developer is not there, create it by inserting your OS X 10.5 Install DVD and navigating to and then double-clicking Mac OS X Install DVD:Optional Installs:Xcode Tools:Xcode Tools.mpkg. You will be led, by the installer program which opens, through the necessary steps to install the Developer Tools package, thereby creating the Developer folder.
Once you have a Developer folder, try invoking python again in Terminal. If that works, try python ~/Desktop/eReader2html.txt again.
Now do something like:
iMac:~ eric$ cd ~/Desktop
iMac:Desktop eric$ python eReader2html.txt "The Lost Symbol.pdb" "The Lost Symbol HTML" "Eric Palmer Stewart" 4264********0937
eReader2Html v0.03. Copyright (c) 2008 The Dark Reverser
- Before I did this, I'd made a copy on my Desktop of my original The Lost Symbol.pdb file as downloaded from eReader.com. To do this, I'd dragged the icon of the original file to the Desktop with the Option key held down.
- I'd also created an empty folder, The Lost Symbol HTML, on my Desktop.
- eReader2html.txt, the Python script file, was also sitting on my Desktop.
- To enter commands in the Terminal command line, I simply typed them in. If I made a mistake, I used the Delete key to back up over (and erase) some or all what I'd previously typed, and then I retyped it correctly.
- First, I typed cd , followed by a space. (A space needed to be typed in after each part, other than the last part, of each command line.)
- Then I typed ~/Desktop and hit Return. That caused the first command to be executed.
- The first command, cd ~/Desktop, made the Desktop the "active" directory in Terminal. Later on, when I executed my main command, any non-"qualified' references to files and folders would implicitly point to the Desktop.
- In that first command, ~ represented the current user's (my own) Home folder, so ~/Desktop represented the Desktop of the current Mac OS X user: me.
- After cd ~/Desktop was executed, the prompt on the next line in the Terminal window changed to iMac:Desktop eric$. , since eric represents the short name of the current user at the time, me.)
- The main command line began when I typed in python, followed by a space.
- I then typed in eReader2html.txt, followed by a space. That was to tell Terminal to find the eReader2html.txt Python script file sitting in the currently active directory, i.e., the Desktop.
- I next typed "The Lost Symbol.pdb", in double quotes, followed by a space. This was the name of the input PDB file, sitting on my Desktop.
- The filename was enclosed in double quotes so the embedded spaces wouldn't cause confusion. If I didn't like the typing-filenames-in-double-quotes method, then instead I could simply have dragged the file's icon from the Desktop to the Terminal window at the point when I would ordinarily have typed in the argument — following the manually typed-in space character, mind you — resulting in /Users/eric/Desktop/The\ Lost\ Symbol.pdb. This is the so-called "fully specified path to the file." It has \ characters strewn within it to tame the included embedded spaces. No enclosing double quotes are necessary.
- I next typed "The Lost Symbol HTML", in double quotes. It pointed to the empty The Lost Symbol HTML folder, sitting on the Desktop, where I wanted the output of eReader2html.txt to go.
- Again, I could simply have dragged the folder's icon from the Desktop into the Terminal window, following my manually typed-in space character, to enter the fully specified path to the folder, /Users/eric/Desktop/The\ Lost\ Symbol\ HTML, into the command line.
- I next typed "Eric Palmer Stewart", in double quotes. It was the name under which I had purchased the original PDB version of the original The Lost Symbol.pdb e-book from eReader.com. My "your name" specification had to be capitalized in the exact same way as on my eReader.com account.
- Finally, I typed in 4264********0937. No double quotes were needed, since there were no internal spaces, dashes, etc. It was the 16-digit number on the credit card that I used to buy the The Lost Symbol.pdb e-book from eReader.com. I have obfuscated the middle eight digits here, but what I actually typed in in Terminal was the correct credit card number in its entirety. I could alternatively have entered just the final eight digits, ****0937 — without obfuscation, of course — instead of the whole 16-digit number.
It took a few minutes for Processing... done to appear in the Terminal window. Once the processing was done, my The Lost Symbol HTML folder contained:
|The Lost Symbol HTML folder's contents|
(click to enlarge)
The book.html file is the main item. The .png files are graphic elements, most of which are illustrations from the book. cover.png is an image of the book's cover:
|The Lost Symbol Cover Image|
as seen in Preview
I double-clicked book.html, and the whole book, graphics and all, opened for inspection in my Safari browser:
|The Lost Symbol HTML folder's book.html file|
open in a Safari window
(click to enlarge)
Instead of turning pages, I was able to use the scroll bar to slide vertically through the book.
Now it's time to use calibre to convert the HTML into an EPUB:
|Open calibre (website here; download page here; online manual here).|
(Click on this and the other screenshot images to enlarge them.)
|Click on the Add Books icon.|
|Navigate to and open the book.html file.|
|Wait a minute for the Adding... window to disappear.|
|Make sure the e-book you just added is highlighted.|
Now, since calibre won't necessarily use the cover.png file, you can give the e-book you just added a cover:
|Click on the Edit Metadata icon.|
|Click on the Download cover button in the Edit Meta Information window, and after the cover downloads, click OK.|
|Verify the downloaded cover in the Edit Meta Information window, then click OK.|
|Verify the downloaded cover in the main window.|
Now you can convert the e-book to an EPUB:
|Click on the Convert Books icon.|
|When the Convert (your e-book name) window appears ...|
|... choose Output format: EPUB, then click OK to dismiss the Convert (your e-book name) window.|
|In the main window, wait a minute for the spinning progress icon next to Jobs: 1 to stop spinning.|
|Now, with Jobs: 0 again, the main window looks like this.|
|Click on Click to open to reveal the EPUB file in the Finder ...|
|...and (in this example) the new EPUB file is shown as The Lost Symbol - Dan Brown.epub.|
Next, import the EPUB file into iTunes by dragging it into the Library, as per this movie:
(You can play a larger version of the movie in QuickTime by clicking on the image above. You can also just position your mouse pointer on the image above and use the scroll wheel to move through the movie.)
The EPUB is now visible in the Books section of the iTunes library:
To copy it into iBooks on your iPhone or other iDevice, connect the iDevice to your Mac, and it will automatically sync. If it's already connected at the time you import the EPUB into iTunes, just highlight the iDevice on the left side of the iTunes window and click on the Sync button at lower right:
Now the EPUB shows up in your Library in iBooks on the iDevice: