PdfStandardEncryptionHandler.UserPassword Property

Gets the user password to use while encrypting data.

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

Syntax

C#
public string UserPassword { get; }
VB
Public ReadOnly Property UserPassword As String
	Get

Property Value

Type: String
The user password to use while encrypting data.

Remarks

User password allows limited access to the document. You can setup permissions for users of the document using UserPermissions property.

If user password is null or empty string and OwnerPassword is not null or empty string, then users of the encrypted document will be able to open it without a password.

If user password is not null or empty string and owner password is null or empty string, then document will be saved with the same value for user and owner passwords.

Password may contain any Unicode codepoints when Algorithm property equals to Aes256Bit.

When Algorithm is Standard40Bit, Standard128Bit or Aes128Bit, we recommend using ASCII characters only in passwords. PDF documents with non-ASCII passwords depend on the current OS code page and might be unreadable on other computers.

Currently, the library throws PdfException while encrypting PDF document with RC4 or AES-128 algorithms if password contains any character outside of Latin-1 character set.

See Also