Encrypt and Decrypt the pdf file using Python
-
Encryption: --> pip install PyPDF2 1.1 Save your pdf in the same folder of your python file. 1.2 Please enter the exact name of your pdf file in the code (line 4). 1.3 Please run the code and provide the password in the input prompt. 1.4 The encrypted pdf will be saved in the same folder.
-
Decryption: 2.1 Your encrypted pdf should be in the same folder. 2.2 Please run the second part of the code. 2.3 Please provide the same password you used to encrypt the pdf. 2.4 The decrypted pdf will be saved to the same folder.