Methods
setUserPassword(userPasswordnon-null) → {PasswordProtectOptionsBuilder}
Sets the intended user password required for encrypting the PDF file. For AES-128 encryption the user password supports ASCII characters only; allowed minimum length of password is 6 characters and maximum length of password is 32 characters. For AES-256 encryption the user password supports Unicode character set and the maximum length of password is 127 UTF-8 bytes.
Parameters:
Name | Type | Description |
---|---|---|
userPassword |
string | the user password. |
Returns:
This Builder instance to add any additional parameters.
setEncryptionAlgorithm(encryptionAlgorithmnon-null) → {PasswordProtectOptionsBuilder}
Sets the intended encryption algorithm required for encrypting the PDF file.
Parameters:
Name | Type | Description |
---|---|---|
encryptionAlgorithm |
PasswordProtectOptions.EncryptionAlgorithm | the encryption algorithm. |
Returns:
This Builder instance to add any additional parameters.
build() → {PasswordProtectOptions}
Returns a new PasswordProtectOptions instance built from the current state of this builder.
Returns:
A new ProtectPDFOptions instance.