[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.Security.EncryptOptions.UserPassword

UserPassword Property

UserPassword

Gets or sets the password required to open the PDF document, represented as a string.

Declaration
public string UserPassword { get; set; }
Public Property UserPassword As String
Remarks

You can specify the password either as a string via UserPassword
or as a byte array via UserPasswordBytes.

According to the PDF specification, string passwords must be converted to bytes using the system code page when the standard security handler (revision 4 or earlier) is used. In some environments, the system code page may not be available, making this conversion impossible.

If the password contains only ASCII characters, this limitation does not apply. However, if it contains non-ASCII Unicode characters, the developer must perform the appropriate string-to-byte conversion and assign the result to UserPasswordBytes.