Monday, September 10, 2012

Get an e-book in .pdf from .acsm (acsm to pdf)?

I bought an e-book that was delivered in the .acsm format, which requires me to use Adobe Digital Editions to read the book. I’m not fond of installing extra software to just open an e-book, when it could just as well been read in one single PDF reader. The problem is: the file isn’t a .pdf format.
Therefore I tried to find a way to convert the .acsm format to .pdf format. Search results led me to forum threads where so-called experts explain that the .acsm file isn’t the actual book, just a purchase ticket that allows you to download the book. I already had a feeling that the .acsm file size was way too small (1.56kb) to contain all the text of my book. The experts say that the .acsm can be imagined as the ‘key’ and the ADE application as the ‘door’, so the combination of the key + door is the e-book. Thus the only way to open the file is using ADE. This means I am only able to read the book using a desktop computer or laptop that has ADE installed, and not in an e-book reader like Amazon Kindle or Sony e-reader. This is very inconvenient and it bugs me that I’ve paid for a book that I can not carry everywhere like a traditional book because of all the restrictions.
.acsm file (key) + Adobe Digital Editions (door) = your e-book
After installing ADE, I noticed a newly created folder in “My Documents” named “My Digital Editions”. I opened the book by double clicking the .acsm file and noticed that a pdf file of my book was downloaded to that certain folder. I thought I solved the problem so easily, but once I double click the pdf file, my pdf reader happily warns me the following: “This document is encrypted by some unsupported security handler.”
The error "This document is encrypted by some unsupported security handler" in Foxit Reader
Googling up that error message brought me to software to unlock encrypted PDF files, such as “Advanced PDF Password Recovery Pro” and “PDF Password Remover”. I downloaded and installed the trial version of the former. When I run the software to decrypt the .pdf file, a warning message happily pops up saying: “This document was created with ‘eBook Exchange (EBX_HANDLER) 40-bit security v.4′ encryption handler. This protection method is not supported.” Seeing this, I know it’s useless to try out other software as they will probably give me a similar error.
The error "This document was created with 'eBook Exchange (EBX_HANDLER) 40-bit security v.4' encryption handler. This protection method is not supported" in Advanced PDF Password Recovery Pro
After spending some hours to find a way to decrypt files protected with EBX_HANDLER, I finally got to know that we’re dealing with Digital Rights Management (DRM). This is a way for publishers to restrict the way in which you use your downloaded content, primarily with the goal of preventing piracy. Everything went smooth onwards and I eventually removed the DRM from two e-books successfully. I’ll share the steps with you. One more thing that is worth noting is that it is completely legal to remove DRM from a file which you have purchased. You aren’t doing anything wrong unless you’re removing DRM from a file which you don’t own.

Step 1: Install Adobe Flash Player

Download Flash Player from Adobe website
Flash Player is required to run ADE. If it’s installed on your computer already, skip this step.
Adobe website download page for Adobe Flash Player

Step 2: Install Adobe Digital Editions (ADE)

Download Digital Editions from Adobe website
After installation, authorize your copy of ADE. Then double click your .acsm file, wait until it has succesfully downloaded your e-book encrypted pdf file to the “My Digital Editions” in My Documents. Please verify its existence in that folder.
My e-book opened in Adobe Digital Editions

Step 3: Install Python

Download Python 2.7.2
For your convenience, the file in the link above is a Windows .msi installer. Run the wizard and just follow the instructions.

Step 4: Install Pycrypto

Download Pycrypto 2.3
This is the corresponding version of Pycrypto for Python 2.7. Run the .msi installer and just follow the instructions.

Step 5: Download ineptkey.pyw and ineptepdf.pyw

ineptkey.pyw and ineptepdf.pyw are suppressed Python scripts.
Download ineptkey.pyw 5.0
Download ineptpdf.pyw 7.4
Remove the .txt extension. Put them into one directory.

Step 6: Run ineptkey.pyw

Run ineptkey.pyw, it will find the key and write it to hard disk as “adeptkey.der” in the same directory where ineptkey.pyw is.
The key "adeptkey.der" is succesfully retrieved to my folder.

Step 7: Run ineptepdf.pyw

A dialog windows with three parameters will pop up:
  • Key file: adeptkey.der (It’s filled automatically if the adeptkey.der file and ineptepub.pyw reside in the same directory. If not, click on the “…” button and select a file.)
  • Input file: Click on the “…” button to select your e-book encrypted pdf file. You’ll find it in “My Documents\My Digital Editions”.
  • Output file: Click on the “…” and enter a filename.
Clicking ineptepdf.pyw pops a dialog window to decrypt your pdf
Open your newly created DRM-free pdf file with your favorite pdf reader (on whatever device you like)!
The decrypted pdf e-book opened in Foxit Reader!
My tutorial is based on Stream-Recorder‘s guide, mine focuses on .pdf files whereas theirs is meant for .epub files; other than that, I also provided screenshots for a clear guidance. Hope it did help you!

3 comments:

  1. I think we can read convert acsm file to pdf just till the Step2. What do you think about?
    For the Kobo, Sony, Nexus7, Nook ereaders, just to this step.
    But if the device is iPad or Kindle, As you said we have to remove the drm from acsm file.
    Thanks for your shareing, but could I say it's a little difficult?
    And I have found another easy way. If you like I will be very happy.
    http://www.epubor.com/how-to-read-acsm-on-kindle.html

    ReplyDelete
    Replies
    1. I used epubor but it skipped a lot of pages in between. Is it because I didn't purchase the software and the demo version only does a few pages?

      Delete
    2. Hi Thanks for your shareing but ı cant dowland any file ?

      Delete