Enum WarningCategory
- java.lang.Object
-
- java.lang.Enum<WarningCategory>
-
- com.pdftools.sign.WarningCategory
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<WarningCategory>
public enum WarningCategory extends java.lang.Enum<WarningCategory>
The warning category
The category of the warning ofSigner.WarningListener
.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ADD_VALIDATION_INFORMATION_FAILED
Error adding validation information to existing signatures of input document as requested byOutputOptions.getAddValidationInformation()
.PDF_A_REMOVED
PDF/A conformance of input file removed due to file encryption (i.e.SIGNED_DOC_ENCRYPTION_UNCHANGED
When processing signed documents, their encryption parameters (user password, owner password, permissions) cannot be changed.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static WarningCategory
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static WarningCategory[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PDF_A_REMOVED
public static final WarningCategory PDF_A_REMOVED
PDF/A conformance of input file removed due to file encryption (i.e.pdftools.pdf.OutputOptions.getEncryption
is notnull
). Removal of PDF/A conformance is necessary, because encryption is not allowed by the PDF/A standard.
-
SIGNED_DOC_ENCRYPTION_UNCHANGED
public static final WarningCategory SIGNED_DOC_ENCRYPTION_UNCHANGED
When processing signed documents, their encryption parameters (user password, owner password, permissions) cannot be changed. Therefore, the property
pdftools.pdf.OutputOptions.getEncryption
has no effect.This warning is generated so that the following situations can be detected:
-
If
pdftools.pdf.OutputOptions.getEncryption
isnull
and the input document is encrypted. The output document is also encrypted. -
If
pdftools.pdf.OutputOptions.getEncryption
notnull
and the input document is encrypted using different encryption parameters. The output document is also encrypted, preserving the encryption parameters of the input document. -
If
pdftools.pdf.OutputOptions.getEncryption
notnull
and the input document is not encrypted. The output document is not encrypted.
Encryption parameters of signed documents can be changed by removing all existing signatures using the property
OutputOptions.getRemoveSignatures()
. In this case, this warning is not generated. -
If
-
ADD_VALIDATION_INFORMATION_FAILED
public static final WarningCategory ADD_VALIDATION_INFORMATION_FAILED
Error adding validation information to existing signatures of input document as requested by
OutputOptions.getAddValidationInformation()
. The warning'scontext
contains a description of the affected signature.Potential causes of this warning are:
-
Missing issuer certificate:
All certificates of the trust chain are required to add validation information.
Preferably, the certificates should be present in the cryptographic provider's certificate store.
Alternatively, if supported by the certificate,
the issuer certificate is downloaded from the certificate authority's server and
stored in the user's
Certificates
directory (seepdftools.crypto.providers.builtin.Provider
). -
Network problem:
The network must allow OCSP and CRL responses to be downloaded from the certificate authority's server.
Make sure your proxy configuration (see
pdftools.Sdk.getProxy
) is correct.
-
Missing issuer certificate:
All certificates of the trust chain are required to add validation information.
Preferably, the certificates should be present in the cryptographic provider's certificate store.
Alternatively, if supported by the certificate,
the issuer certificate is downloaded from the certificate authority's server and
stored in the user's
-
-
Method Detail
-
values
public static WarningCategory[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (WarningCategory c : WarningCategory.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static WarningCategory valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-