public class PasswordEncryptionOptionSpec extends BasePasswordEncryptionSpec implements Serializable
Constructor and Description |
---|
PasswordEncryptionOptionSpec()
The default constructor used to create a
PasswordEncryptionSpec object. |
PasswordEncryptionOptionSpec(PasswordEncryptionCompatability compat,
PasswordEncryptionOption encryptOption,
String documentOpenPassword,
String permissionsPassword)
Constructs a
PasswordEncryptionSpec object that is used to encrypt a
PDF document with a password. |
Modifier and Type | Method and Description |
---|---|
PasswordEncryptionCompatability |
getCompatability()
Specifies the earliest version of Acrobat with which the encryption will be compatible.
|
PasswordEncryptionOption |
getEncryptOption()
Gets the PDF document resources to encrypt as a
PasswordEncryptionOption
enumeration value. |
void |
setCompatability(PasswordEncryptionCompatability compat)
Sets the version compatibility to use when encrypting a PDF document with a password.
|
void |
setEncryptOption(PasswordEncryptionOption options)
Sets the PDF document resources to encrypt using a
PasswordEncryptionOption
enumeration value. |
getDocumentOpenPassword, getPermissionPassword, getPermissionsRequested, setDocumentOpenPassword, setPermissionPassword, setPermissionsRequested
public PasswordEncryptionOptionSpec()
PasswordEncryptionSpec
object.public PasswordEncryptionOptionSpec(PasswordEncryptionCompatability compat, PasswordEncryptionOption encryptOption, String documentOpenPassword, String permissionsPassword)
PasswordEncryptionSpec
object that is used to encrypt a
PDF document with a password.compat
- Specifies the version compatibility as a PasswordEncryptionCompatability
and must be one of the following values:
ACRO_3
provides 40-bit encryption. The others provide 128-bit encryption.
Also, ACRO_5
and higher provide a finer granularity of control over what operations are permitted.
Specifying ACRO_7
or ACRO_X
encrypts the document using the Advanced Encryption Standard (AES).
This parameter value can be set to null
,
in which case the Encryption service uses a default value of ACRO_7
as lowest version of Acrobat
with which to open the encrypted document.encryptOption
- Specifies the PDF document resources to encrypt and must be one of the following values:
ALL_EXCEPT_METADATA
encrypts all PDF document resources except for its metadata.
The value ATTACHMENTS_ONLY
only encypts the PDF document attachments.
If you encrypt only an attachment, then a user is prompted for a password when they attempt to open the
file attachment.documentOpenPassword
- The password value that is required to open a password-encrypted PDF document.permissionsPassword
- The password value that is required to modify permissions on the document or remove encryption.public void setCompatability(PasswordEncryptionCompatability compat)
compat
- Specifies version compatibility as a PasswordEncryptionCompatability
value:
ACRO_3
provides 40-bit encryption. The others provide 128-bit encryption.
Also, ACRO_5
and higher provide a finer granularity of control over what operations are permitted.
Specifying ACRO_7
or ACRO_X
encrypts the document using the Advanced Encryption Standard (AES).public PasswordEncryptionCompatability getCompatability()
PasswordEncryptionCompatability
value:
ACRO_3
provides 40-bit encryption. The others provide 128-bit encryption.
Also, ACRO_5
and higher provide a finer
granularity of control over what operations are permitted.
Specifying ACRO_7 or ACRO_X encrypts the document using the Advanced Encryption Standard (AES).public void setEncryptOption(PasswordEncryptionOption options)
PasswordEncryptionOption
enumeration value.options
- One of the following values:
ALL
encrypts the entire PDF document, including its attachments and metadata.
The value ALL_EXCEPT_METADATA
encrypts all PDF document resources except for its metadata.
The value ATTACHMENTS_ONLY
only encypts the PDF document attachments.
If you encrypt only an attachment, then a user is prompted for a password when they attempt to open the
file attachment.public PasswordEncryptionOption getEncryptOption()
PasswordEncryptionOption
enumeration value.The value ALL
encrypts the entire PDF document, including its attachments and metadata.
The value ALL_EXCEPT_METADATA
encrypts all PDF document resources except for its metadata.
The value ATTACHMENTS_ONLY
only encypts the PDF document attachments.
If you encrypt only an attachment, then a user is prompted for a password when they attempt to open the
file attachment.
Copyright © 1982–2022 Adobe Systems Inc.. All rights reserved.