To Encrypt the PDF document with permission password and permissions. Note:The Permission password can't be empty string.

Namespace: Spire.Pdf.Security
Assembly: Spire.Pdf (in Spire.Pdf.dll) Version: 6.2.6.0 (6.2.6.2020)

Syntax

            
 C#  Visual Basic  Visual C++  F# 
public void Encrypt(
	string permissionPassword,
	PdfPermissionsFlags permissions
)
Public Sub Encrypt ( 
	permissionPassword As String,
	permissions As PdfPermissionsFlags
)
public:
void Encrypt(
	String^ permissionPassword, 
	PdfPermissionsFlags permissions
)
member Encrypt : 
        permissionPassword : string * 
        permissions : PdfPermissionsFlags -> unit 

Parameters

permissionPassword
String
The permission password
permissions
PdfPermissionsFlags
A set of flags specifying which operations are permitted when the document is opened with user access

See Also