|
Encrypt the PDF document using password First load the document as described in the corresponding how-to article. Ensure, that the document is not already encrypted by checking the value of Encrypted property of TElPDFDocument class. Next, create an instance of TElPDFPasswordSecurityHandler class and assign the reference to the created instance to EncryptionHandler property of TElPDFDocument class.
Adjust the properties of TElPDFPasswordSecurityHandler class as needed.
You will need to set passwords and permissions (permissions are described in the corresponding how-to article).
Passwords are set using OwnerPassword
and UserPassword properties.
Call Encrypt() method of TElPDFDocument to perform encryption. Save and close the document using Close() method. |

