How to protect your template (document) with a password or encrypt your PDF
945 views0Updated on January 25, 2023
PDFs are used to record and exchange data. If the content should remain confidential and only selected recipients can access it, it is possible to setup a password protection as well as to encrypt files. DocumentsCorePack allows to predefine those settings in a template. This article shows how to define document protection parameters using the DocumentsCorePack TemplateDesigner.
Select and open the template you want to protect with a password, and open in your TemplateDesigner the Advanced TemplateSettings. Navigate on the left side to ❶ Document Protection. On the right side you can see three tabs in the settings, which will be discussed in more detail:
❷ Password ❸ Owner Password ❹ Advanced PDF Encryption
The password is like a secret code that you need to enter to open a document. You have to enter the password every time you want to open the document you have encrypted.
There are two possibilities to set a password:
❶ Select a field in Dynamics 365 or ❷ Specify a static password
Please note: The password is required for all documents that are generated afterwards.
There is a Syntax that must be followed, when creating a new password.
Figure 2: Set PW with Dynamics 365 field, or create one
2 Owner Password
The owner password is used to make changes to the settings of the PDF document after it’s been created. Think of it like a key to a locked room. The Password is the key to open the door and the Owner Password is the key to change the locks on the door. (I.e., change the protection settings etc.)
The procedure for setting an Owner Password works the same as setting a Password: Select a field in Dynamics 365 or specify a new one.
Figure 3: Set an Owner Password
3 Advanced PDF Encryption
In the ❶Advanced PDF Encryption tab, you can increase the security of your PDF template. There are ❷ various encryption options to choose from, just check the box next to it.
Example: If you want to completely disallow all actions on the PDF, you can select the “Disallow All” option and confirm it by clicking “OK“. Keep in mind that most PDFs won’t have visible security settings, but if the “Disallow All” option is selected, you will not be able to print or make any changes to the content until you enter the password you set earlier.
Figure 4: Advanced PDF Encryption
Don´t forget to save your template!
Result
If you are not sure how to process/test your template, have a look at this article.
Example 1: Password protected Template
A template which is protected with a Password:
Example 2: Template which is protected with PDF Encryption
Please note: If you choose to protect your template with PDF Encryption, you must set either a Password or an Owner Password for PDF Encryption to take effect.
In this example Password, Owner Password and Advanced PDF Encryption are set.
Open your PDF-Reader and you can see that the encryption was successful:
That’s it! We appreciate your feedback! Please share your thoughts by sending an email to support@mscrm-addons.com.