How to Protect PDF Files with Passwords and Encryption
Question details
The user wants to secure PDF documents by restricting unauthorized access, editing, copying, saving, and printing.

- Product
- PDF Editors
- Device & OS
- not provided
- Scenario
- Securing sensitive PDF documents before sharing them with others to prevent unauthorized actions and data leaks.
- Observed behavior
- The user needs a method to apply password protection, encryption, and permission restrictions to a PDF file manually or through scripting.
Before applying security restrictions, ensure you maintain a backup copy of the original unprotected PDF, as losing the document-open password will permanently lock you out of the file.
Apply Password Protection and Permissions Manually
Use the built-in security properties of your PDF viewer or editor to set passwords for opening the document or restricting editing and printing.
The most straightforward way to secure a PDF is by using standard password encryption. You can set two types of passwords: a Document Open password to prevent unauthorized viewing, and a Permissions password to restrict specific actions like printing and copying.
Open your PDF file in your preferred PDF editor, click on 'File' in the top menu, and select 'Properties'.
Go to the 'Security' tab and change the Security Method dropdown to 'Password Security'.
In the settings dialog, check the box to require a password to open the document, or check the permissions box to restrict printing, editing, and copying. Enter your desired passwords.
Click 'OK' to confirm the security settings, then save the PDF file to apply the encryption.

Implement Enterprise Digital Rights Management (DRM)
If you need absolute control to prevent saving or sharing, standard encryption is insufficient. An Enterprise DRM service is required.
Use JavaScript to Encrypt PDFs
Apply encryption policies automatically using scripting methods in advanced PDF editors.
Easily Password Protect PDFs with WPS Office
WPS Office provides an intuitive and powerful PDF editor that allows you to quickly encrypt your documents, set open passwords, and restrict editing or printing to keep your sensitive data completely secure.
- 1. Open PDF in WPS Office: Launch WPS Office and open the PDF file you wish to secure.
- 2. Access the Protect Tab: Navigate to the 'Protect' tab located on the top ribbon.
- 3. Click on Encrypt: Click the 'Encrypt' button to open the document security settings.
- 4. Set Security Preferences: Check 'Set Open Password' to block unauthorized viewing, or set a password under 'Permissions' to restrict printing and modifying.
- 5. Confirm and Save: Confirm your password, click 'OK', and save the file to finalize the encryption.

Frequently Asked Questions
Can I completely prevent someone from saving or sharing my PDF?
No, standard PDF encryption cannot prevent someone from saving or sharing the file. Once a user has downloaded the file and possesses the password to open it, they can share both with others. Complete control over file distribution requires advanced Digital Rights Management (DRM) services.
Will my printing and copying restrictions work on all PDF readers?
Not necessarily. While the document-open password is required by all viewers, printing, editing, and copying restrictions are treated as requests by the viewing application. Some third-party or alternative PDF viewers may ignore these permission settings.
What happens if I forget my PDF password?
If you forget the document-open password, you will not be able to access the file. There is no built-in password recovery option for standard encrypted PDFs, which is why keeping a backup of the original unencrypted file in a secure location is highly recommended.




