public class PdfSignature
extends com.itextpdf.kernel.pdf.PdfObjectWrapper<com.itextpdf.kernel.pdf.PdfDictionary>
| Constructor and Description |
|---|
PdfSignature()
Creates new PdfSignature.
|
PdfSignature(com.itextpdf.kernel.pdf.PdfDictionary sigDictionary) |
PdfSignature(com.itextpdf.kernel.pdf.PdfName filter,
com.itextpdf.kernel.pdf.PdfName subFilter)
Creates new PdfSignature.
|
| Modifier and Type | Method and Description |
|---|---|
com.itextpdf.kernel.pdf.PdfArray |
getByteRange()
Gets the /ByteRange.
|
com.itextpdf.kernel.pdf.PdfString |
getCert()
Gets the /Cert entry value of this signature.
|
com.itextpdf.kernel.pdf.PdfString |
getContents()
Gets the /Contents entry value.
|
com.itextpdf.kernel.pdf.PdfString |
getDate()
Gets the /M value.
|
String |
getLocation()
Gets the /Location entry value.
|
String |
getName()
gets the /Name of the person signing the document.
|
String |
getReason() |
com.itextpdf.kernel.pdf.PdfName |
getSubFilter()
A name that describes the encoding of the signature value and key information in the signature dictionary.
|
com.itextpdf.kernel.pdf.PdfName |
getType()
The type of PDF object that the wrapped dictionary describes; if present, shall be
PdfName.Sig for a signature
dictionary or PdfName.DocTimeStamp for a timestamp signature dictionary. |
protected boolean |
isWrappedObjectMustBeIndirect() |
PdfSignature |
put(com.itextpdf.kernel.pdf.PdfName key,
com.itextpdf.kernel.pdf.PdfObject value) |
void |
setByteRange(int[] range)
Sets the /ByteRange.
|
void |
setCert(byte[] cert)
Sets the /Cert value of this signature.
|
void |
setContact(String contactInfo)
Sets the /ContactInfo value.
|
void |
setContents(byte[] contents)
Sets the /Contents value to the specified byte[].
|
void |
setDate(com.itextpdf.kernel.pdf.PdfDate date)
Sets the /M value.
|
void |
setLocation(String location)
Sets the /Location value.
|
void |
setName(String name)
Sets the /Name of the person signing the document.
|
void |
setReason(String reason)
Sets the /Reason value.
|
void |
setSignatureCreator(String signatureCreator)
Sets the signature creator name in the
PdfSignatureBuildProperties dictionary. |
public PdfSignature()
public PdfSignature(com.itextpdf.kernel.pdf.PdfName filter,
com.itextpdf.kernel.pdf.PdfName subFilter)
filter - PdfName of the signature handler to use when validating this signaturesubFilter - PdfName that describes the encoding of the signaturepublic PdfSignature(com.itextpdf.kernel.pdf.PdfDictionary sigDictionary)
public com.itextpdf.kernel.pdf.PdfName getSubFilter()
PdfName which usually has a value either PdfName.Adbe_pkcs7_detached or PdfName.ETSI_CAdES_DETACHED.public com.itextpdf.kernel.pdf.PdfName getType()
PdfName.Sig for a signature
dictionary or PdfName.DocTimeStamp for a timestamp signature dictionary. Shall be not null if it's value
is PdfName.DocTimeStamp. The default value is: PdfName.Sig.PdfName that identifies type of the wrapped dictionary, returns null if it is not explicitly specified.public void setByteRange(int[] range)
range - an array of pairs of integers that specifies the byte range used in the digest calculation. A pair consists of the starting byte offset and the lengthpublic com.itextpdf.kernel.pdf.PdfArray getByteRange()
public void setContents(byte[] contents)
contents - a byte[] representing the digestpublic com.itextpdf.kernel.pdf.PdfString getContents()
public void setCert(byte[] cert)
cert - the byte[] representing the certificate chainpublic com.itextpdf.kernel.pdf.PdfString getCert()
public void setName(String name)
name - name of the person signing the documentpublic String getName()
public void setDate(com.itextpdf.kernel.pdf.PdfDate date)
date - time of signingpublic com.itextpdf.kernel.pdf.PdfString getDate()
PdfString which denotes time of signing.public void setLocation(String location)
location - physical location of signingpublic String getLocation()
public void setReason(String reason)
reason - reason for signingpublic String getReason()
public void setSignatureCreator(String signatureCreator)
PdfSignatureBuildProperties dictionary.signatureCreator - name of the signature creatorpublic void setContact(String contactInfo)
contactInfo - information to contact the person who signed this documentpublic PdfSignature put(com.itextpdf.kernel.pdf.PdfName key, com.itextpdf.kernel.pdf.PdfObject value)
protected boolean isWrappedObjectMustBeIndirect()
isWrappedObjectMustBeIndirect in class com.itextpdf.kernel.pdf.PdfObjectWrapper<com.itextpdf.kernel.pdf.PdfDictionary>Copyright © 1998–2018 iText Group NV. All rights reserved.