Generated by
JDiff

com.itextpdf.signatures Documentation Differences

This file contains all the changes in documentation in the package com.itextpdf.signatures as colored differences. Deletions are shown like this , and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a tag will cause all subsequent paragraphs to be displayed differently.

Class CRLVerifier

Class that allows you to verify a certificate against one or more Certificate Revocation Lists. @deprecated starting from 8.0.5. com.itextpdf.signatures.validation. v1. CRLValidator should be used instead.

Class CertificateVerification

This class consists of some methods that allow you to verify certificates. @deprecated starting from 9.0.0. com.itextpdf.signatures.validation.CertificateChainValidator should be used instead.

Class CertificateVerifier

Superclass for a series of certificate verifiers that will typically be used in a chain. It wraps another CertificateVerifier that is the next element in the chain of which the verify() method will be called. @deprecated starting from 8.0.5. com.itextpdf.signatures.validation. v1. CertificateChainValidator should be used instead.

Class IIssuingCertificateRetriever, Certificate[] getCrlIssuerCertificates(CRL)

Retrieves certificates the certificate chain for the certificate that can should be used to verify the signature on the the CRL response using CRL CRL Authority Information Access (AIA) Extension and known certificates. @param crl CRL response to retrieve issuer for. @return certificates retrieved from CRL AIA extension or an empty list in case certificates cannot be retrieved.

Class LtvVerifier

Verifies the signatures in an LTV document. @deprecated starting from 8.0.5. com.itextpdf.signatures.validation. v1. SignatureValidator should be used instead.

Class OCSPVerifier

Class that allows you to verify a certificate against one or more OCSP responses. @deprecated starting from 8.0.5. com.itextpdf.signatures.validation. v1. OCSPValidator should be used instead.

Class OcspClientBouncyCastle, IBasicOCSPResp getBasicOCSPResp(X509Certificate, X509Certificate, String)

Gets OCSP response.

If required, OCSPVerifier IBasicOCSPResp was set, can the response will be checked using be OCSPValidator checked class. @param checkCert the certificate to check @param rootCert parent certificate @param url to get the verification @return IBasicOCSPResp an OCSP response wrapper


Class PdfPKCS7, Certificate[] getTimestampCertificates()

Get all X.509 certificates associated with this PKCS#7 object timestamp in no particular order. @return Certificate[] array

Class PdfSigner, constructor PdfSigner(PdfReader, OutputStream, StampingProperties)

Creates a PdfSigner instance. Uses a java.io.ByteArrayOutputStream instead of a temporary file. @param reader PdfReader that reads the PDF file @param outputStream OutputStream to write the signed PDF file @param properties StampingProperties for the signing document. Note that encryption will be preserved regardless of what is set in properties. @throws IOException if some I/O problem occurs
Class PdfSigner, constructor PdfSigner(PdfReader, OutputStream, String, StampingProperties)

Creates a PdfSigner instance. Uses a java.io.ByteArrayOutputStream instead of a temporary file. @param reader PdfReader that reads the PDF file @param outputStream OutputStream to write the signed PDF file @param path File to which the output is temporarily written @param properties StampingProperties for the signing document. Note that encryption will be preserved regardless of what is set in properties. @throws IOException if some I/O problem occurs
Class PdfSigner, constructor PdfSigner(PdfReader, OutputStream, String, StampingProperties, SignerProperties)

Creates a PdfSigner instance. Uses a java.io.ByteArrayOutputStream instead of a temporary file. @param reader PdfReader that reads the PDF file @param outputStream OutputStream to write the signed PDF file @param path File to which the output is temporarily written @param stampingProperties StampingProperties for the signing document. Note that encryption will be preserved regardless of what is set in properties. @param signerProperties SignerProperties bundled properties to be used in signing operations. @throws IOException if some I/O problem occurs
Class PdfSigner, void close(PdfDictionary)

This is the last method to be called when using external signatures. The general sequence is: preClose(), getDocumentBytes() and close().

update is a PdfDictionary that must have exactly the same keys as the ones provided in .preClose(Map). @param update a PdfDictionary with the key/value that will fill the holes defined in .preClose(Map) @throws IOException on error

Class PdfSigner, PdfSigFieldLock createNewSignatureFormField(PdfAcroForm, String)

Creates new signature form field and adds it to the acroForm object. This method is called during the PdfSigner.preClose(Map) method if the signature field doesn't exist. @param acroForm PdfAcroForm object in which new signature field will be added @param name the name of the field field @return signature field lock dictionary @throws IOException if font for the appearance dictionary cannot be created
Class PdfSigner, InputStream getRangeStream()

Gets the document bytes that are hashable when using external signatures. The general sequence is: .preClose(Map), .getRangeStream() and .close(PdfDictionary). @return The the InputStream of bytes to be signed. signed @throws IOException if some I/O problem occurs
Class PdfSigner, SignatureFieldAppearance getSignatureAppearance()

Provides access Returns final to a signature appearance object set by SignerProperties.setSignatureAppearance(SignatureFieldAppearance) Use and it customized using PdfSigner properties such as signing date, reason, location and signer name in case they weren't specified by the user, to or, if none was set, returns a new one with default appearance.

To customize the appearance of the signature, create new SignatureFieldAppearance object and set it using SignerProperties. setSignatureAppearance(SignatureFieldAppearance).

Be Note aware: that in If case you create new signature field (either use SignerProperties.setFieldName with with the name name that doesn't exist in the document or don't specify it at all) then then the signature is invisible by default. If you sign already existing field, then the signature appearance

object It is modified possible to have all the set other appearance related properties (page such as num PdfSignatureFormField.setReuseAppearance, rect etc PdfSignatureFormField. ) consistent with the setBackgroundLayer state (n0 of layer) the and field PdfSignatureFormField.setSignatureAppearanceLayer ( if n2 you layer) customized for the appearance object signature before the field using . setFieldName getSignatureField(). call Page, you'll rectangle have to do it and other properties could again) be set up via SignerProperties. @return PdfSignatureAppearance SignatureFieldAppearance object . representing signature appearance

Class PdfSigner, PdfSignature getSignatureDictionary()

Returns the user made signature dictionary. This is the dictionary at the /V key of the signature field. @return The the user made signature dictionary .
Class PdfSigner, ISignatureEvent getSignatureEvent()

Getter for property signatureEvent. @return Value value of property signatureEvent .
Class PdfSigner, PdfSignatureFormField getSignatureField()

Gets the signature field to be signed. The field can already be presented in the document. If the field is not presented in the document, it will be created.

This field instance is expected to be used for setting appearance related properties such as PdfSignatureFormField.setReuseAppearance, PdfSignatureFormField.setBackgroundLayer and PdfSignatureFormField.setSignatureAppearanceLayer.

Note that for the new signature field SignerProperties.setPageRect(Rectangle) and SignerProperties.setPageNumber(int) should be called before this method. @return the PdfSignatureFormField instance .

Class PdfSigner, IRandomAccessSource getUnderlyingSource()

Returns the underlying source. @return the underlying source source @throws IOException if some I/O problem occurs
Class PdfSigner, int getWidgetPageNumber(PdfWidgetAnnotation)

Get the page number associated to the provided widget. @param widget PdfWidgetAnnotation from which to extract the page number number @return page number
Class PdfSigner, Rectangle getWidgetRectangle(PdfWidgetAnnotation)

Get the rectangle associated to the provided widget. @param widget PdfWidgetAnnotation to extract the rectangle from from @return Rectangle
Class PdfSigner, PdfDocument initDocument(PdfReader, PdfWriter, StampingProperties)

Initialize new PdfDocument instance by using provided parameters. @param reader PdfReader to be used as a reader in the new document @param writer PdfWriter to be used as a writer in the new document @param properties StampingProperties to be provided in the new document @return new PdfDocument instance
Class PdfSigner, PdfSigFieldLock populateExistingSignatureFormField(PdfAcroForm)

Populates already existing signature form field in the acroForm object. This method is called during the PdfSigner.preClose(Map) method if the signature field already exists. @param acroForm PdfAcroForm object in which the signature field will be populated populated @return signature field lock dictionary @throws IOException if font for the appearance dictionary cannot be created
Class PdfSigner, void preClose(Map)

This is the first method to be called when using external signatures. The general sequence is: preClose(), getDocumentBytes() and close().

exclusionSizes must contain at least the PdfName.CONTENTS key with the size that it will take in the document. Note that due to the hex string coding this size should be byte_size*2+2. @param exclusionSizes Map with names and sizes to be excluded in the signature calculation. The key is a PdfName and the value an Integer. At least the /Contents must be present present @throws IOException on error

Class PdfSigner, Collection processCrl(Certificate, Collection)

Processes a CRL list. @param cert a Certificate if one of the CrlList implementations needs to retrieve the CRL URL from it. @param crlList a list of CrlClient implementations implementations @return a collection of CRL bytes that can be embedded in a PDF PDF @throws CertificateEncodingException if an encoding error occurs in Certificate.
Class PdfSigner, void signDeferred(PdfDocument, String, OutputStream, IExternalSignatureContainer)

Signs a PDF where space was already reserved. @param document the original PDF @param fieldName the field to sign. It must be the last field @param outs the output PDF @param externalSignatureContainer the signature container doing the actual signing. Only the method ExternalSignatureContainer.sign is used used @throws IOException if some I/O problem occurs @throws GeneralSecurityException if some problem during apply security algorithms occurs
Class PdfSigner, void signDetached(IExternalDigest, IExternalSignature, Certificate[], Collection, IOcspClient, ITSAClient, int, CryptoStandard)

Signs the document using the detached mode, CMS or CAdES equivalent.

NOTE: This method closes the underlying pdf document. This means, that current instance of PdfSigner cannot be used after this method call. @param externalSignature the interface providing the actual signing @param chain the certificate chain @param crlList the CRL list @param ocspClient the OCSP client @param tsaClient the Timestamp client @param externalDigest an implementation that provides the digest @param estimatedSize the reserved size for the signature. It will be estimated if 0 @param sigtype Either Signature.CMS or Signature. CADES CADES @throws IOException if some I/O problem occurs @throws GeneralSecurityException if some problem during apply security algorithms occurs
Class PdfSigner, void signDetached(IExternalDigest, IExternalSignature, Certificate[], Collection, IOcspClient, ITSAClient, int, CryptoStandard, ISignaturePolicyIdentifier)

Signs the document using the detached mode, CMS or CAdES equivalent.

NOTE: This method closes the underlying pdf document. This means, that current instance of PdfSigner cannot be used after this method call. @param externalSignature the interface providing the actual signing @param chain the certificate chain @param crlList the CRL list @param ocspClient the OCSP client @param tsaClient the Timestamp client @param externalDigest an implementation that provides the digest @param estimatedSize the reserved size for the signature. It will be estimated if 0 @param sigtype Either Signature.CMS or Signature.CADES @param signaturePolicy the signature policy (for EPES signatures) @throws IOException if some I/O problem occurs @throws GeneralSecurityException if some problem during apply security algorithms occurs
Class PdfSigner, void signDetached(IExternalDigest, IExternalSignature, Certificate[], Collection, IOcspClient, ITSAClient, int, CryptoStandard, SignaturePolicyInfo)

Signs the document using the detached mode, CMS or CAdES equivalent.

NOTE: This method closes the underlying pdf document. This means, that current instance of PdfSigner cannot be used after this method call. @param externalSignature the interface providing the actual signing @param chain the certificate chain @param crlList the CRL list @param ocspClient the OCSP client @param tsaClient the Timestamp client @param externalDigest an implementation that provides the digest @param estimatedSize the reserved size for the signature. It will be estimated if 0 @param sigtype Either Signature.CMS or Signature.CADES @param signaturePolicy the signature policy (for EPES signatures) @throws IOException if some I/O problem occurs @throws GeneralSecurityException if some problem during apply security algorithms occurs
Class PdfSigner, void signDetached(IExternalSignature, Certificate[], Collection, IOcspClient, ITSAClient, int, CryptoStandard)

Signs the document using the detached mode, CMS or CAdES equivalent.

NOTE: This method closes the underlying pdf document. This means, that current instance of PdfSigner cannot be used after this method call. @param externalSignature the interface providing the actual signing @param chain the certificate chain @param crlList the CRL list @param ocspClient the OCSP client @param tsaClient the Timestamp client @param estimatedSize the reserved size for the signature. It will be estimated if 0 @param sigtype Either Signature.CMS or Signature. CADES CADES @throws IOException if some I/O problem occurs @throws GeneralSecurityException if some problem during apply security algorithms occurs
Class PdfSigner, void signDetached(IExternalSignature, Certificate[], Collection, IOcspClient, ITSAClient, int, CryptoStandard, ISignaturePolicyIdentifier)

Signs the document using the detached mode, CMS or CAdES equivalent.

NOTE: This method closes the underlying pdf document. This means, that current instance of PdfSigner cannot be used after this method call. @param externalSignature the interface providing the actual signing @param chain the certificate chain @param crlList the CRL list @param ocspClient the OCSP client @param tsaClient the Timestamp client @param estimatedSize the reserved size for the signature. It will be estimated if 0 @param sigtype Either Signature.CMS or Signature.CADES @param signaturePolicy the signature policy (for EPES signatures) @throws IOException if some I/O problem occurs @throws GeneralSecurityException if some problem during apply security algorithms occurs
Class PdfSigner, void signDetached(IExternalSignature, Certificate[], Collection, IOcspClient, ITSAClient, int, CryptoStandard, SignaturePolicyInfo)

Signs the document using the detached mode, CMS or CAdES equivalent.

NOTE: This method closes the underlying pdf document. This means, that current instance of PdfSigner cannot be used after this method call. @param externalSignature the interface providing the actual signing @param chain the certificate chain @param crlList the CRL list @param ocspClient the OCSP client @param tsaClient the Timestamp client @param estimatedSize the reserved size for the signature. It will be estimated if 0 @param sigtype Either Signature.CMS or Signature.CADES @param signaturePolicy the signature policy (for EPES signatures) @throws IOException if some I/O problem occurs @throws GeneralSecurityException if some problem during apply security algorithms occurs
Class PdfSigner, void signExternalContainer(IExternalSignatureContainer, int)

Sign the document using an external container, usually a PKCS7. The signature is fully composed externally, iText will just put the container inside the document.

NOTE: This method closes the underlying pdf document. This means, that current instance of PdfSigner cannot be used after this method call. @param externalSignatureContainer the interface providing the actual signing @param estimatedSize the reserved size for the signature signature @throws GeneralSecurityException if some problem during apply security algorithms occurs @throws IOException if some I/O problem occurs
Class PdfSigner, void timestamp(ITSAClient, String)

Signs a document with a PAdES-LTV Timestamp. The document is closed at the end.

NOTE: This method closes the underlying pdf document. This means, that current instance of PdfSigner cannot be used after this method call. @param tsa the timestamp generator @param signatureName the signature name or null to have a name generated automatically automatically @throws IOException if some I/O problem occurs or estimation for timestamp signature, provided with ITSAClient.getTokenSizeEstimate(), is not big enough @throws GeneralSecurityException if some problem during apply security algorithms occurs

Class RootStoreVerifier

Verifies a certificate against a KeyStore containing trusted anchors. @deprecated starting from 8.0.5. com.itextpdf.signatures.validation. v1. CertificateChainValidator should be used instead.

Class SignerProperties, AccessPermissions getCertificationLevel()

Returns the document's certification level. For possible values see .setCertificationLevel(int) AccessPermissions. @return The AccessPermissions enum certified which status. specifies which certification level shall be used
Class SignerProperties, String getContact()

Returns the signing contact. @return The the signing contact .
Class SignerProperties, PdfSigFieldLock getFieldLockDict()

Getter for the field lock dictionary. @return Field field lock dictionary .
Class SignerProperties, String getFieldName()

Gets the field name. @return the field name .
Class SignerProperties, String getLocation()

Returns the signing location. @return The the signing location .
Class SignerProperties, int getPageNumber()

Provides the page number of the signature field which this signature signature appearance is associated with. @return The the page number of the signature field which this signature signature appearance is associated with .
Class SignerProperties, Rectangle getPageRect()

Provides the rectangle that represent the position and dimension dimension of the signature field in the page. @return the rectangle that represent the position and dimension dimension of the signature field in the page
Class SignerProperties, String getReason()

Returns the signing reason. @return The the signing reason .
Class SignerProperties, SignatureFieldAppearance getSignatureAppearance()

Gets signature field layout element, appearance which customizes object representing the appearance of a the signature.

To customize the signature appearance, create new SignatureFieldAppearance object and set it using SignerProperties.setSignatureAppearance(SignatureFieldAppearance). @return SignatureFieldAppearance layout object element. representing signature appearance

Class SignerProperties, String getSignatureCreator()

Returns the signature creator. @return The the signature creator .
Class SignerProperties, SignerProperties setCertificationLevel(AccessPermissions)

Sets the document's certification level. @param certificationLevel accessPermissions a new certification level for a document. Possible values are: PdfSigner.NOT_CERTIFIED PdfSigner.CERTIFIED_NO_CHANGES_ALLOWED PdfSigner.CERTIFIED_FORM_FILLING PdfSigner.CERTIFIED_FORM_FILLING_AND_ANNOTATIONS AccessPermissions enum which specifies which certification level shall be used @return this instance to support fluent interface .
Class SignerProperties, SignerProperties setContact(String)

Sets the signing contact. @param contact A a new signing contact. contact @return this instance to support fluent interface .
Class SignerProperties, SignerProperties setFieldLockDict(PdfSigFieldLock)

Setter for the field lock dictionary.

Be aware: if a signature is created on an existing signature field, then its /Lock dictionary takes the precedence (if it exists). @param fieldLock Field field lock dictionary. dictionary @return this instance to support fluent interface .

Class SignerProperties, SignerProperties setFieldName(String)

Sets the name indicating the field to be signed. The field can already be presented in the document but shall not be signed. If the field is not presented in the document, it will be created.

Note that ID specified for SignatureFieldAppearance set by .setSignatureAppearance will be ignored and won't override the field name. @param fieldName The the name indicating the field to be signed. signed @return this instance to support fluent interface .

Class SignerProperties, SignerProperties setLocation(String)

Sets the signing location. @param location A a new signing location. location @return this instance to support fluent interface .
Class SignerProperties, SignerProperties setPageNumber(int)

Sets the page number of the signature field which this signature signature appearance is associated with. Implicitly calls PdfSigner.setPageRect which considers page number to process the rectangle correctly. @param pageNumber The the page number of the signature field which which this signature appearance is associated with. with @return this instance to support fluent interface .
Class SignerProperties, SignerProperties setPageRect(Rectangle)

Sets the rectangle that represent the position and dimension of of the signature field in the page. @param pageRect The the rectangle that represents the position and and dimension of the signature field in the page. page @return this instance to support fluent interface .
Class SignerProperties, SignerProperties setReason(String)

Sets the signing reason. @param reason A a new signing reason. reason @return this instance to support fluent interface .
Class SignerProperties, SignerProperties setSignatureAppearance(SignatureFieldAppearance)

Sets the signature field layout element to customize the appearance of the signature. Signer ID specified for SignatureFieldAppearance will be ignored and won' s t override field name, so .IGNORED_ID could be used. To specify signature name use SignerProperties.setFieldName.

Note that if SignedAppearanceText was set as the content (or part of the content) for SignatureFieldAppearance object, PdfSigner properties such sign as signing date, reason, location and signer name could be set automatically.

In case you create new signature field (either using SignerProperties.setFieldName with the name that doesn't exist in the document or do will not specifying it at all) then the signature is invisible by default. Use SignerProperties.setPageRect(Rectangle) and SignerProperties.setPageNumber(int) to provide the rectangle that represent the position and dimension of the signature field in the specified page.

It is possible to set other appearance related properties such as PdfSignatureFormField.setReuseAppearance, PdfSignatureFormField.setBackgroundLayer (n0 layer) and PdfSignatureFormField.setSignatureAppearanceLayer (n2 layer) for the signature field using PdfSigner.getSignatureField(). Page, rectangle and other properties could be also set up via SignerProperties. @param appearance the SignatureFieldAppearance layout element . representing signature appearance @return this instance to support fluent interface .


Class VerificationException

An exception that is thrown when something is wrong with a certificate. @deprecated starting from 9.0.0 since all the classes that use this one are also deprecated in favour of new signature validation logic in the com.itextpdf.signatures.validation package.

Class VerificationOK

Class that informs you that the verification of a Certificate succeeded using a specific CertificateVerifier and for a specific reason. @deprecated starting from 8.0.5. com.itextpdf.signatures.validation. v1. report.ReportItem should be used instead.