How to secure PDF documents with open source software like PDFEncrypt. The 7Zip alternative that allows you to place your files in an encrypted archive.
Windows 10 and 11 integrate the Microsoft Print to PDF virtual printer that allows you to create PDF documents without installing anything else. As was the case with previous versions of the Microsoft operating system, however, Windows 10 and 11 do not include an option to password protect PDFs .
Yet making sure that a PDF document is readable only by the person with the correct password is often very useful.
Most of the software solutions that allow you to protect PDF documents are paid and this type of function is usually part of expensive applications.
The good news is that there is an open source program that can encrypt PDF documents using algorithms like AES-256 supported for example Adobe Acrobat 8 and later.
The software is called PDFEncrypt , it uses the iTextPDF open source library and its source code is available on GitHub.
Downloadable from this page (we recommend the use of the portable version that does not require installation), PDFEncrypt allows you to protect PDF without having to buy any expensive software.
To use the program just extract the contents of the Zip file in a folder of your choice then double click on the executable PDFEncrypt.exe .
Operation is very simple: just indicate the PDF file to be protected with a password in the Choose a file to encrypt field , the name of the file you want to obtain and where you want to store it in the Choose a destination for the encrypted file field .
In the Specify a password field you can specify the password required to open the file (it should be chosen in such a way that it is sufficiently long and complex): with a click on Generate PDFEncrypt takes care of generating a suitable password.
PDFEncrypt does not hide the characters entered in the password field with the classic asterisks or dots. The generated password is also automatically copied to the clipboard (can be pasted elsewhere by pressing CTRL+V ).
By clicking the Settings button it is possible to choose the preferred algorithm for encrypting the data contained in the PDF file: it is always a good idea to opt for AES-256 bearing in mind that only very old versions of Acrobat and other PDF viewers do not support this algorithm.
The encrypted PDF file can be opened with any application, including web browsers such as Google Chrome, Chromium and derivatives (such as Microsoft Edge) and Mozilla Firefox.
By ticking the Permissions boxes it is possible to decide whether or not to activate some permissions (printing, modification, copying,…): by default all authorizations are revoked by PDFEncrypt, even by entering the correct password when opening the PDF document.
The boxes at the bottom of the options window allow you to decide whether to open the secured PDF file in File Explorer or view its contents.
After clicking on Encrypt , the program creates an encrypted and password-protected copy of the indicated PDF file. By default, PDFEncrypt adds the suffix -encrypt to the original file name: the document can of course be named or renamed as you prefer.
An alternative to PDFEncrypt is to use 7Zip . After starting the program you must select the files to be protected and put them in a single encrypted compressed archive .
By right-clicking on one of them and then choosing 7Zip, Add to archive , the window shown in the figure appears.
After having indicated the name of the archive to be obtained and in which memory location it must be created, by choosing 7z as the format of the archive, you can go on to set the contents of the Encryption box .
A sufficiently long and complex password must be entered in the Enter password and Re -enter password boxes , while AES-256 must be chosen for Encryption method .
We also suggest checking the Encrypt file names box : in this way, by double-clicking on the name of the archive in 7Zip format, it is not even possible to trace the name of the PDF files present.
By also activating the Create self-extracting archive box , the recipient of the compressed file does not even have to have 7Zip installed: it is sufficient to double-click on the executable, specify a destination folder and enter the correct password.
The difference between the procedure based on PDFEncrypt and the one that takes advantage of the functions integrated in 7Zip is that in the first case the PDF file is modified directly with the activation of the cryptographic algorithm and the revocation of the various permissions (print, modification, copy,. ..). Using 7Zip instead creates an encrypted container that houses the PDF files: once extracted using the correct password, these contents will be freely usable (the permissions are all active) and the PDF itself is not protected with any password.