PDF File Writer Class Library - Author Uzi Granot
PdfDocumentSetEncryption Method (String, Permission) |
Set encryption
Namespace: PdfFileWriter
Assembly: PdfFileWriter (in PdfFileWriter.dll) Version: 1.1.24.0 (1.1.24.0)

C#
public void SetEncryption( string UserPassword, Permission Permissions )
Parameters
- UserPassword
- Type: SystemString
User password - Permissions
- Type: PdfFileWriterPermission
Permission flags

The PDF File Writer library will encrypt the PDF document
using AES-128 encryption. User password is as per argument. Owner
password is set to a random number.
A PDF reader such as Acrobat will request the user to enter a password.
The document can only be opened with the user password. The owner password
being random is effectively unknown.
Permissions flags are set as per argument.
