Class ITextPDFSignatureService

    • Constructor Detail

      • ITextPDFSignatureService

        public ITextPDFSignatureService​(boolean timestamp,
                                        ITextSignatureDrawerFactory signatureDrawerFactory)
        Constructor for the ITextPDFSignatureService
        Parameters:
        timestamp - if true, the instance is used to generate DocumentTypestamp if false, it is used to generate a signature layer
    • Method Detail

      • digest

        public byte[] digest​(DSSDocument toSignDocument,
                             PAdESSignatureParameters parameters,
                             DigestAlgorithm digestAlgorithm)
        Description copied from interface: PDFSignatureService
        Returns the digest value of a PDF document
        Parameters:
        toSignDocument - the document to be signed
        parameters - the signature parameters
        digestAlgorithm - the digest algorithm to be used
        Returns:
        the digest value
      • sign

        public DSSDocument sign​(DSSDocument toSignDocument,
                                byte[] signatureValue,
                                PAdESSignatureParameters parameters,
                                DigestAlgorithm digestAlgorithm)
        Description copied from interface: PDFSignatureService
        Signs a PDF document
        Parameters:
        toSignDocument - the pdf document
        signatureValue - the signature value
        parameters - the signature parameters
        digestAlgorithm - the digest algorithm to be used
      • addDssDictionary

        public DSSDocument addDssDictionary​(DSSDocument document,
                                            List<DSSDictionaryCallback> callbacks)
        Description copied from interface: PDFSignatureService
        This method adds the DSS dictionary (Baseline-LT)
        Parameters:
        document - the document to be extended
        callbacks - the callbacks to retrieve the revocation data,...
        Returns:
        the pdf document with the added dss dictionary
      • getAvailableSignatureFields

        public List<String> getAvailableSignatureFields​(DSSDocument document)
        Description copied from interface: PDFSignatureService
        This method returns not signed signature-fields
        Parameters:
        document - the pdf document
        Returns:
        the list of empty signature fields
      • addNewSignatureField

        public DSSDocument addNewSignatureField​(DSSDocument document,
                                                SignatureFieldParameters parameters)
        Description copied from interface: PDFSignatureService
        This method allows to add a new signature field to an existing pdf document
        Parameters:
        document - the pdf document
        parameters - the parameters with the coordinates,... of the signature field
        Returns:
        the pdf document with the new added signature field