ineptpdf8.4.51.py
Inept PDF allows one to remove the DRM from an encrypted Adobe Digital Editions PDF, for example for the LA Public Library or from Archive.org 14-day loan / PDF download.
It is hard to get this working. Here is how, in 2022, I got it working on my Windows 10 machine:
- Assumes no Python already installed! (esp. Python 3.x)
- Install MSI for Python 2.7 x86, not x64!
- Download inept pdf Python script from Github
- Get
adeptykey.der(not sure where or how I got this) from\~/Dropbox/RplusJ/adobe-digital-editions - Install VC++ 9 from archive.org, to get Windows Python packages from source to compile with
pip install. - In PowerShell, run
pip install pycrypto - In PowerShell, run
pythonand see that it is version 2.6 or 2.7, and test thatfrom Crypto.Cipher import RSAworks. - (May need the Windows runtime crap mentioned on
Epubor.com, but I am not sure. I don’t think I installed it.)
Convert one file:
- Find the PDF in
\~/Documents/Digital\\ Editionsand copy to Windows machine Downloads folder with a short, space-free filename, say xyz.pdf. - Open Windows PowerShell and cd to Downloads folder. Assuming Downloads folder has PDF and
adeptkey.der, in PowerShell runpython ineptpdf.py adeptkey.der xyz.pdf out-xyz.pdfand wait a second or so. - Voila! Rename
out-xyz.pdfto a more meaningful filename.
Future work:
- It would be great if PyCrypto and ineptpdf (9 years old at this point) worked on Python 3.x so I could just
pip3 install pycryptoand then run the script on the command-line (and on my Mac), but I tried porting some parts of the 3,000 lines of code to Python 3.x and failed. - No time for such a project, but it would be worth it. Ideally, just
pip3 install ineptpdfand all dependencies would install and you would have a workingineptpdfcommand-line script!