iText 8.0.3 API
iText.Signatures.PdfPadesSigner Class Reference

This class performs signing with PaDES related profiles using provided parameters. More...

Public Member Functions

  PdfPadesSigner (PdfReader reader, Stream outputStream)
  Create an instance of PdfPadesSigner class. More...
 
virtual void  SignWithBaselineBProfile (SignerProperties signerProperties, IX509Certificate[] chain, IExternalSignature externalSignature)
  Sign the document provided in PdfSigner instance with PaDES Baseline-B Profile. More...
 
virtual void  SignWithBaselineBProfile (SignerProperties signerProperties, IX509Certificate[] chain, IPrivateKey privateKey)
  Sign the document provided in PdfSigner instance with PaDES Baseline-B Profile. More...
 
virtual void  SignWithBaselineTProfile (SignerProperties signerProperties, IX509Certificate[] chain, IExternalSignature externalSignature, ITSAClient tsaClient)
  Sign the document provided in PdfSigner instance with PaDES Baseline-T Profile. More...
 
virtual void  SignWithBaselineTProfile (SignerProperties signerProperties, IX509Certificate[] chain, IPrivateKey privateKey, ITSAClient tsaClient)
  Sign the document provided in PdfSigner instance with PaDES Baseline-T Profile. More...
 
virtual void  SignWithBaselineLTProfile (SignerProperties signerProperties, IX509Certificate[] chain, IExternalSignature externalSignature, ITSAClient tsaClient)
  Sign the document provided in PdfSigner instance with PaDES Baseline-LT Profile. More...
 
virtual void  SignWithBaselineLTProfile (SignerProperties signerProperties, IX509Certificate[] chain, IPrivateKey privateKey, ITSAClient tsaClient)
  Sign the document provided in PdfSigner instance with PaDES Baseline-LT Profile. More...
 
virtual void  SignWithBaselineLTAProfile (SignerProperties signerProperties, IX509Certificate[] chain, IExternalSignature externalSignature, ITSAClient tsaClient)
  Sign the document provided in PdfSigner instance with PaDES Baseline-LTA Profile. More...
 
virtual void  SignWithBaselineLTAProfile (SignerProperties signerProperties, IX509Certificate[] chain, IPrivateKey privateKey, ITSAClient tsaClient)
  Sign the document provided in PdfSigner instance with PaDES Baseline-LTA Profile. More...
 
virtual void  ProlongSignatures (ITSAClient tsaClient)
  Add revocation information for all the signatures which could be found in the provided document. More...
 
virtual void  ProlongSignatures ()
  Add revocation information for all the signatures which could be found in the provided document. More...
 
virtual iText.Signatures.PdfPadesSigner  SetTemporaryDirectoryPath (String temporaryDirectoryPath)
  Set temporary directory to be used for temporary files creation. More...
 
virtual iText.Signatures.PdfPadesSigner  SetTimestampSignatureName (String timestampSignatureName)
  Set the name to be used for timestamp signature creation. More...
 
virtual iText.Signatures.PdfPadesSigner  SetStampingProperties (StampingProperties stampingProperties)
  Set stamping properties to be used during main signing operation. More...
 
virtual iText.Signatures.PdfPadesSigner  SetEstimatedSize (int estimatedSize)
  Set estimated size of a signature to be applied. More...
 
virtual iText.Signatures.PdfPadesSigner  SetOcspClient (IOcspClient ocspClient)
  Set IOcspClient to be used for LTV Verification. More...
 
virtual iText.Signatures.PdfPadesSigner  SetCrlClient (ICrlClient crlClient)
  Set ICrlClient to be used for LTV Verification. More...
 
virtual iText.Signatures.PdfPadesSigner  SetIssuingCertificateRetriever (IIssuingCertificateRetriever issuingCertificateRetriever)
  Set IIssuingCertificateRetriever to be used before main signing operation. More...
 
virtual iText.Signatures.PdfPadesSigner  SetTrustedCertificates (IList< IX509Certificate > certificateList)
  Set certificate list to be used by the IIssuingCertificateRetriever to retrieve missing certificates. More...
 

Detailed Description

This class performs signing with PaDES related profiles using provided parameters.

Constructor & Destructor Documentation

◆ PdfPadesSigner()

iText.Signatures.PdfPadesSigner.PdfPadesSigner ( PdfReader  reader,
Stream  outputStream 
)
inline

Create an instance of PdfPadesSigner class.

Create an instance of PdfPadesSigner class. One instance shall be used for one signing operation.

Parameters
reader

iText.Kernel.Pdf.PdfReader instance to read original PDF file

Parameters
outputStream

System.IO.Stream output stream to write the resulting PDF file into

Member Function Documentation

◆ ProlongSignatures() [1/2]

virtual void iText.Signatures.PdfPadesSigner.ProlongSignatures ( )
inlinevirtual

Add revocation information for all the signatures which could be found in the provided document.

◆ ProlongSignatures() [2/2]

virtual void iText.Signatures.PdfPadesSigner.ProlongSignatures ( ITSAClient  tsaClient )
inlinevirtual

Add revocation information for all the signatures which could be found in the provided document.

Add revocation information for all the signatures which could be found in the provided document. Also add timestamp signature on top of that.

Parameters
tsaClient

ITSAClient TSA Client to be used for timestamp signature creation

◆ SetCrlClient()

virtual iText.Signatures.PdfPadesSigner iText.Signatures.PdfPadesSigner.SetCrlClient ( ICrlClient  crlClient )
inlinevirtual

Set ICrlClient to be used for LTV Verification.

Set ICrlClient to be used for LTV Verification.

This setter is only relevant if Baseline-LT Profile level or higher is used.

If none is set, there will be an attempt to create default CRL Client instance using the certificate chain.

Parameters
crlClient

ICrlClient instance to be used for LTV Verification

Returns
same instance of PdfPadesSigner

◆ SetEstimatedSize()

virtual iText.Signatures.PdfPadesSigner iText.Signatures.PdfPadesSigner.SetEstimatedSize ( int  estimatedSize )
inlinevirtual

Set estimated size of a signature to be applied.

Set estimated size of a signature to be applied.

This parameter represents estimated amount of bytes to be preserved for the signature.

If none is set, 0 will be used and the required space will be calculated during the signing.

Parameters
estimatedSize amount of bytes to be used as estimated value
Returns
same instance of PdfPadesSigner

◆ SetIssuingCertificateRetriever()

virtual iText.Signatures.PdfPadesSigner iText.Signatures.PdfPadesSigner.SetIssuingCertificateRetriever ( IIssuingCertificateRetriever  issuingCertificateRetriever )
inlinevirtual

Set IIssuingCertificateRetriever to be used before main signing operation.

Set IIssuingCertificateRetriever to be used before main signing operation.

If none is set, IssuingCertificateRetriever instance will be used instead.

Parameters
issuingCertificateRetriever

IIssuingCertificateRetriever instance to be used for getting missing certificates in chain or CRL response issuer certificates.

Returns
same instance of PdfPadesSigner.

◆ SetOcspClient()

virtual iText.Signatures.PdfPadesSigner iText.Signatures.PdfPadesSigner.SetOcspClient ( IOcspClient  ocspClient )
inlinevirtual

Set IOcspClient to be used for LTV Verification.

Set IOcspClient to be used for LTV Verification.

This setter is only relevant if Baseline-LT Profile level or higher is used.

If none is set, there will be an attempt to create default OCSP Client instance using the certificate chain.

Parameters
ocspClient

IOcspClient instance to be used for LTV Verification

Returns
same instance of PdfPadesSigner

◆ SetStampingProperties()

virtual iText.Signatures.PdfPadesSigner iText.Signatures.PdfPadesSigner.SetStampingProperties ( StampingProperties  stampingProperties )
inlinevirtual

Set stamping properties to be used during main signing operation.

Set stamping properties to be used during main signing operation.

If none is set, stamping properties with append mode enabled will be used

Parameters
stampingProperties

iText.Kernel.Pdf.StampingProperties instance to be used during main signing operation

Returns
same instance of PdfPadesSigner

◆ SetTemporaryDirectoryPath()

virtual iText.Signatures.PdfPadesSigner iText.Signatures.PdfPadesSigner.SetTemporaryDirectoryPath ( String  temporaryDirectoryPath )
inlinevirtual

Set temporary directory to be used for temporary files creation.

Set temporary directory to be used for temporary files creation.

If none is set, temporary documents will be created in memory.

Parameters
temporaryDirectoryPath

System.String representing relative or absolute path to the directory

Returns
same instance of PdfPadesSigner

◆ SetTimestampSignatureName()

virtual iText.Signatures.PdfPadesSigner iText.Signatures.PdfPadesSigner.SetTimestampSignatureName ( String  timestampSignatureName )
inlinevirtual

Set the name to be used for timestamp signature creation.

Set the name to be used for timestamp signature creation.

This setter is only relevant if SignWithBaselineLTAProfile(SignerProperties, iText.Commons.Bouncycastle.Cert.IX509Certificate[], IExternalSignature, ITSAClient) or ProlongSignatures() methods are used.

If none is set, randomly generated signature name will be used.

Parameters
timestampSignatureName

System.String representing the name of a timestamp signature to be applied

Returns
same instance of PdfPadesSigner

◆ SetTrustedCertificates()

virtual iText.Signatures.PdfPadesSigner iText.Signatures.PdfPadesSigner.SetTrustedCertificates ( IList< IX509Certificate certificateList )
inlinevirtual

Set certificate list to be used by the IIssuingCertificateRetriever to retrieve missing certificates.

Parameters
certificateList certificate list for getting missing certificates in chain or CRL response issuer certificates.
Returns
same instance of PdfPadesSigner.

◆ SignWithBaselineBProfile() [1/2]

virtual void iText.Signatures.PdfPadesSigner.SignWithBaselineBProfile ( SignerProperties  signerProperties,
IX509Certificate[]  chain,
IExternalSignature  externalSignature 
)
inlinevirtual

Sign the document provided in PdfSigner instance with PaDES Baseline-B Profile.

Parameters
signerProperties

SignerProperties properties to be used for main signing operation

Parameters
chain the chain of certificates to be used for signing operation
externalSignature

IExternalSignature instance to be used for main signing operation

◆ SignWithBaselineBProfile() [2/2]

virtual void iText.Signatures.PdfPadesSigner.SignWithBaselineBProfile ( SignerProperties  signerProperties,
IX509Certificate[]  chain,
IPrivateKey  privateKey 
)
inlinevirtual

Sign the document provided in PdfSigner instance with PaDES Baseline-B Profile.

Parameters
signerProperties

SignerProperties properties to be used for main signing operation

Parameters
chain the chain of certificates to be used for signing operation
privateKey

iText.Commons.Bouncycastle.Crypto.IPrivateKey instance to be used for main signing operation

◆ SignWithBaselineLTAProfile() [1/2]

virtual void iText.Signatures.PdfPadesSigner.SignWithBaselineLTAProfile ( SignerProperties  signerProperties,
IX509Certificate[]  chain,
IExternalSignature  externalSignature,
ITSAClient  tsaClient 
)
inlinevirtual

Sign the document provided in PdfSigner instance with PaDES Baseline-LTA Profile.

Parameters
signerProperties

SignerProperties properties to be used for main signing operation

Parameters
chain the chain of certificates to be used for signing operation
externalSignature

IExternalSignature instance to be used for main signing operation

Parameters
tsaClient

ITSAClient instance to be used for timestamp creation

◆ SignWithBaselineLTAProfile() [2/2]

virtual void iText.Signatures.PdfPadesSigner.SignWithBaselineLTAProfile ( SignerProperties  signerProperties,
IX509Certificate[]  chain,
IPrivateKey  privateKey,
ITSAClient  tsaClient 
)
inlinevirtual

Sign the document provided in PdfSigner instance with PaDES Baseline-LTA Profile.

Parameters
signerProperties

SignerProperties properties to be used for main signing operation

Parameters
chain the chain of certificates to be used for signing operation
privateKey

iText.Commons.Bouncycastle.Crypto.IPrivateKey instance to be used for main signing operation

Parameters
tsaClient

ITSAClient instance to be used for timestamp creation

◆ SignWithBaselineLTProfile() [1/2]

virtual void iText.Signatures.PdfPadesSigner.SignWithBaselineLTProfile ( SignerProperties  signerProperties,
IX509Certificate[]  chain,
IExternalSignature  externalSignature,
ITSAClient  tsaClient 
)
inlinevirtual

Sign the document provided in PdfSigner instance with PaDES Baseline-LT Profile.

Parameters
signerProperties

SignerProperties properties to be used for main signing operation

Parameters
chain the chain of certificates to be used for signing operation
externalSignature

IExternalSignature instance to be used for main signing operation

Parameters
tsaClient

ITSAClient instance to be used for timestamp creation

◆ SignWithBaselineLTProfile() [2/2]

virtual void iText.Signatures.PdfPadesSigner.SignWithBaselineLTProfile ( SignerProperties  signerProperties,
IX509Certificate[]  chain,
IPrivateKey  privateKey,
ITSAClient  tsaClient 
)
inlinevirtual

Sign the document provided in PdfSigner instance with PaDES Baseline-LT Profile.

Parameters
signerProperties

SignerProperties properties to be used for main signing operation

Parameters
chain the chain of certificates to be used for signing operation
privateKey

iText.Commons.Bouncycastle.Crypto.IPrivateKey instance to be used for main signing operation

Parameters
tsaClient

ITSAClient instance to be used for timestamp creation

◆ SignWithBaselineTProfile() [1/2]

virtual void iText.Signatures.PdfPadesSigner.SignWithBaselineTProfile ( SignerProperties  signerProperties,
IX509Certificate[]  chain,
IExternalSignature  externalSignature,
ITSAClient  tsaClient 
)
inlinevirtual

Sign the document provided in PdfSigner instance with PaDES Baseline-T Profile.

Parameters
signerProperties

SignerProperties properties to be used for main signing operation

Parameters
chain the chain of certificates to be used for signing operation
externalSignature

IExternalSignature instance to be used for main signing operation

Parameters
tsaClient

ITSAClient instance to be used for timestamp creation

◆ SignWithBaselineTProfile() [2/2]

virtual void iText.Signatures.PdfPadesSigner.SignWithBaselineTProfile ( SignerProperties  signerProperties,
IX509Certificate[]  chain,
IPrivateKey  privateKey,
ITSAClient  tsaClient 
)
inlinevirtual

Sign the document provided in PdfSigner instance with PaDES Baseline-T Profile.

Parameters
signerProperties

SignerProperties properties to be used for main signing operation

Parameters
chain the chain of certificates to be used for signing operation
privateKey

iText.Commons.Bouncycastle.Crypto.IPrivateKey instance to be used for main signing operation

Parameters
tsaClient

ITSAClient instance to be used for timestamp creation