Cracking DRM and converting to PDF

because you bought it

Even though PDF is a horrible file format, it is well suited for textbooks since it can be opened virtually anywhere, often without needing additional software. Here are some ways to convert from proprietary, DRM-protected formats to PDF.

AZW4

  1. Install Calibre
  2. Install the DeDRM plugin (instructions)
    • To remove DRM on a rented book, the mobidedrm.py file in DeDRM_plugin.zip needs to be edited, commenting out these lines:

      if val406 != 0:
        raise DrmException(u"Cannot decode library or rented ebooks.")
      

  3. Install KindleUnpack (instructions)
  4. Import the AZW4 file to Calibre. The DeDRM plugin will automatically strip the DRM as it is imported. Then use the KindleUnpack plugin to convert to PDF.

VBK

As of 27 August 2017 it appears this no longer works because VitalSource is enforcing Bookshelf updates.

VitalSource Bookshelf needs to be installed, with the book to be cracked viewable in the Bookshelf program.

This program was my final resort in an exhaustive search, but sadly it stamped a huge red watermark on every page of the output PDF unless I bought it. After an investigation into the sorry state of PDF editors, I decided to edit the program itself. Luckily the author made a typo in the watermark ("Vitalsource" instead of "VitalSource") and I was able to track down the string to line 236340 of the xxd dump of the vbkdrm.exe file. By replacing the string with null bytes, the watermark can be circumvented. The patched version is available here.

Note that this only works with an old version of Bookshelf.

Adobe Digital Editions

Not much experience here; the only book I got through this seemed to only be a PDF, but allegedly DeDRM as mentioned above supports this as well.


Last modified on 27 Aug 2017 at 08:56:41 PM ET