I've been doing some reading and I think I've figured out what you are trying to do.
You have an encrypted pdf. You want to read it.
A 'better' solution would be to check out:
https://github.com/alaingilbert/ineptpdfIt indicates you might need two supplementary python modules (PyWin, and pycyrpto)
Pycrypto you already have
Quote:
nx@nx:~$ sudo pip install pycrypto
Requirement already satisfied (use --upgrade to upgrade): pycrypto in /usr/lib/python2.7/dist-packages
Cleaning up...
nx@nx:~$
PyWin is easily obtained via
Code:
sudo pip install PyWin
It gives an error on installation, but when I checked, it was there.
Quote:
nx@nx:~$ sudo pip install PyWin
Downloading/unpacking PyWin
Downloading pywin-0.3.1.zip
Running setup.py (path:/tmp/pip_build_root/PyWin/setup.py) egg_info for package PyWin
Downloading
http://pypi.python.org/packages/source/ ... .35.tar.gz Extracting in /tmp/tmp0mLbGy
Now working in /tmp/tmp0mLbGy/distribute-0.6.35
Building a Distribute egg in /tmp/pip_build_root/PyWin
/tmp/pip_build_root/PyWin/distribute-0.6.35-py2.7.egg
Installing collected packages: PyWin
Running setup.py install for PyWin
<SNIP>
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/PyWin/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-whsTd4-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/PyWin
Storing debug log for failure in /home/nx/.pip/pip.log
nx@nx:~$
I don't have any DRM files to test so, I don't know.
The last part is to download and unpack
https://github.com/alaingilbert/ineptpdf/archive/master.zip into a directory.
Use your terminal to go to that directory, for example,
Code:
cd ~/Downloads/ineptpdf-master
and then once in the directory
Code:
python ineptpdf.py
For instructions check out
http://www.epubor.com/ineptpdf-pyw.html