The automation of encrypting PDF files or decrypting them can be achieved through the
PyPDF Python library. You might face the following error:
pypdf.errors.DependencyError: PyCryptodome is required for AES algorithm because of the pycryptodome dependency.
- sudo privileges
- Python installed
- Pip installed
Depending on your python version you need to install pycryptodome package through pip.
pip install pycryptodome
pip3 install pycryptodome
Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.