[]
Initializes a new instance of the EncryptOptions.PermissionOptions class.
The two constructors PermissionOptions(string) and PermissionOptions(byte[]) allow to define the password as a string or as an array of bytes.
According to the PDF specification, a string password should be converted to an array of bytes using the system code page (if the standard security handler with revision 4 or less is used). In some environments the system code page is unavailable, so GcPdf cannot perform this conversion. If the password string only contains ASCII chars, this does not present a problem. But if the password string contains non-ASCII Unicode characters, it is up to the developer to perform the conversion and set the password using PermissionOptions(byte[]) constructor.public PermissionOptions(string ownerPassword)
Public Sub New(ownerPassword As String)
| Type | Name | Description |
|---|---|---|
| string | ownerPassword | The document owner password as a string. |
Initializes a new instance of the EncryptOptions.PermissionOptions class.
The two constructors PermissionOptions(string) and PermissionOptions(byte[]) allow to define the password as a string or as an array of bytes.
According to the PDF specification, a string password should be converted to an array of bytes using the system code page (if the standard security handler with revision 4 or less is used). In some environments the system code page is unavailable, so GcPdf cannot perform this conversion. If the password string only contains ASCII chars, this does not present a problem. But if the password string contains non-ASCII Unicode characters, it is up to the developer to perform the conversion and set the password using this constructor.public PermissionOptions(byte[] ownerPasswordBytes)
Public Sub New(ownerPasswordBytes As Byte())
| Type | Name | Description |
|---|---|---|
| byte[] | ownerPasswordBytes | The document owner password as a byte array. |