Class OutputOptions
- java.lang.Object
-
- com.pdftools.internal.NativeBase
-
- com.pdftools.internal.NativeObject
-
- com.pdftools.pdf.OutputOptions
-
- com.pdftools.sign.OutputOptions
-
public class OutputOptions extends OutputOptions
Additional document level options
These options are available for all signature operations of the
Signer
. They can also be used without a signature operation with the methodSigner.process(com.pdftools.pdf.Document, com.pdftools.sys.Stream)
.Notes on document encryption when processing files with the
Signer
:-
PDF/A conformance is removed from input files.
In this case, a
Signer.WarningListener
with anWarningCategory.PDF_A_REMOVED
is generated. -
Signed documents cannot be encrypted or decrypted.
In this case, a
Signer.WarningListener
with anWarningCategory.SIGNED_DOC_ENCRYPTION_UNCHANGED
is generated.
-
PDF/A conformance is removed from input files.
In this case, a
-
-
Constructor Summary
Constructors Constructor Description OutputOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AddValidationInformation
getAddValidationInformation()
Add validation information to existing signatures of input document (Getter)SignatureRemoval
getRemoveSignatures()
Whether to remove any signatures (Getter)void
setAddValidationInformation(AddValidationInformation value)
Add validation information to existing signatures of input document (Setter)void
setRemoveSignatures(SignatureRemoval value)
Whether to remove any signatures (Setter)-
Methods inherited from class com.pdftools.pdf.OutputOptions
getEncryption, getMetadataSettings, setEncryption, setMetadataSettings
-
Methods inherited from class com.pdftools.internal.NativeObject
equals, hashCode
-
-
-
-
Method Detail
-
getRemoveSignatures
public SignatureRemoval getRemoveSignatures()
Whether to remove any signatures (Getter)
By default, all signatures of the input document are preserved. Optionally, some or all of them can be removed.
Default:
SignatureRemoval.NONE
-
setRemoveSignatures
public void setRemoveSignatures(SignatureRemoval value)
Whether to remove any signatures (Setter)
By default, all signatures of the input document are preserved. Optionally, some or all of them can be removed.
Default:
SignatureRemoval.NONE
- Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
-
getAddValidationInformation
public AddValidationInformation getAddValidationInformation()
Add validation information to existing signatures of input document (Getter)
Add signature validation information to the document security store (DSS). This information includes:
- All certificates of the signing certificate’s trust chain, unless they are already embedded into the signature.
- Revocation data (OCSP or CRL) for all certificates that support revocation information.
pdftools.crypto.ValidationInformation
.Validation information for embedded time-stamp tokens is added as well.
If adding validation information fails, an
Signer.WarningListener
with anWarningCategory.ADD_VALIDATION_INFORMATION_FAILED
is generated.All types of cryptographic providers support this method. However, this method fails when using a provider whose certificate store is missing a required certificate.
Note: This property has no effect on any new signatures or time-stamp that may also be added. The validation information of signatures and time-stamps is controlled by the respective property in the signature or time-stamp configuration object.
Note: This method does not validate the signatures, but only downloads the information required.
Note: Adding validation information for expired certificates is not possible. Therefore, it is crucial to enlarge the longevity of signatures before they expire.
Note: Adding validation information to document certification (MDP) signatures is not possible, because it would break the signature. Validation information must be added to certification signatures when creating them.
Default:
AddValidationInformation.NONE
-
setAddValidationInformation
public void setAddValidationInformation(AddValidationInformation value)
Add validation information to existing signatures of input document (Setter)
Add signature validation information to the document security store (DSS). This information includes:
- All certificates of the signing certificate’s trust chain, unless they are already embedded into the signature.
- Revocation data (OCSP or CRL) for all certificates that support revocation information.
pdftools.crypto.ValidationInformation
.Validation information for embedded time-stamp tokens is added as well.
If adding validation information fails, an
Signer.WarningListener
with anWarningCategory.ADD_VALIDATION_INFORMATION_FAILED
is generated.All types of cryptographic providers support this method. However, this method fails when using a provider whose certificate store is missing a required certificate.
Note: This property has no effect on any new signatures or time-stamp that may also be added. The validation information of signatures and time-stamps is controlled by the respective property in the signature or time-stamp configuration object.
Note: This method does not validate the signatures, but only downloads the information required.
Note: Adding validation information for expired certificates is not possible. Therefore, it is crucial to enlarge the longevity of signatures before they expire.
Note: Adding validation information to document certification (MDP) signatures is not possible, because it would break the signature. Validation information must be added to certification signatures when creating them.
Default:
AddValidationInformation.NONE
- Throws:
java.lang.IllegalArgumentException
- ifvalue
isnull
-
-