Class OutputOptions

    • Constructor Detail

      • OutputOptions

        public OutputOptions()
    • 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 - if value is null
      • 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.
        This method can be used to create signatures with long-term validation material or to enlarge the longevity of existing signatures. For more details on validation information, see also pdftools.crypto.ValidationInformation.

        Validation information for embedded time-stamp tokens is added as well.

        If adding validation information fails, an Signer.WarningListener with an WarningCategory.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.
        This method can be used to create signatures with long-term validation material or to enlarge the longevity of existing signatures. For more details on validation information, see also pdftools.crypto.ValidationInformation.

        Validation information for embedded time-stamp tokens is added as well.

        If adding validation information fails, an Signer.WarningListener with an WarningCategory.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 - if value is null