Gets or sets encryption algorithm for the current document.

Namespace:  BitMiracle.Docotic.Pdf
Assembly:  BitMiracle.Docotic.Pdf (in BitMiracle.Docotic.Pdf.dll)

Syntax

C#
public PdfEncryptionAlgorithm Encryption { get; set; }
VB
Public Property Encryption As PdfEncryptionAlgorithm
	Get
	Set

Property Value

Type: PdfEncryptionAlgorithm
The encryption algorithm for the current document.

Remarks

After opening an existing document this property returns the encryption algorithm that was used when the document was created.

Setting this property selects the encryption algorithm to use when saving the document.

Document will be encrypted only if at least one of the OwnerPassword and UserPassword properties is set to a non-empty string.

To enable password dialog on document opening, the UserPassword property must be set to a non-empty string. Setting a non-empty string to the OwnerPassword property only will cause document to be encrypted but no password will be needed to open the document.

See Also