public class PdfSignature extends PdfObjectWrapper<PdfDictionary>
Constructor and Description |
---|
PdfSignature()
Creates new PdfSignature.
|
PdfSignature(PdfDictionary sigDictionary) |
PdfSignature(PdfName filter, PdfName subFilter)
Creates new PdfSignature.
|
Modifier and Type | Method and Description |
---|---|
PdfArray |
getByteRange()
Gets the /ByteRange.
|
PdfString |
getCert()
Gets the /Cert entry value of this signature.
|
PdfObject |
getCertObject()
Gets the /Cert entry value of this signature.
|
PdfString |
getContents()
Gets the /Contents entry value.
|
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() |
PdfName |
getSubFilter()
A name that describes the encoding of the signature value and key information in the signature dictionary.
|
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()
Defines if the object behind this wrapper must be an indirect object in the resultant document.
|
PdfSignature |
put(PdfName key, 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(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.
|
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, flush, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
public PdfSignature()
public PdfSignature(PdfName filter, PdfName subFilter)
filter
- PdfName of the signature handler to use when validating this signature
subFilter
- PdfName that describes the encoding of the signature
public PdfSignature(PdfDictionary sigDictionary)
public PdfName getSubFilter()
PdfName
which usually has a value either PdfName.Adbe_pkcs7_detached
or PdfName.ETSI_CAdES_DETACHED
.
public 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 length
public PdfArray getByteRange()
public void setContents(byte[] contents)
contents
- a byte[] representing the digest
public PdfString getContents()
public void setCert(byte[] cert)
cert
- the byte[] representing the certificate chain
public PdfString getCert()
public PdfObject getCertObject()
public void setName(String name)
name
- name of the person signing the document
public String getName()
public void setDate(PdfDate date)
date
- time of signing
public PdfString getDate()
PdfString
which denotes time of signing.
public void setLocation(String location)
location
- physical location of signing
public String getLocation()
public void setReason(String reason)
reason
- reason for signing
public String getReason()
public void setSignatureCreator(String signatureCreator)
PdfSignatureBuildProperties
dictionary.
signatureCreator
- name of the signature creator
public void setContact(String contactInfo)
contactInfo
- information to contact the person who signed this document
public PdfSignature put(PdfName key, PdfObject value)
protected boolean isWrappedObjectMustBeIndirect()
PdfObjectWrapper
isWrappedObjectMustBeIndirect
in class PdfObjectWrapper<PdfDictionary>
Copyright © 1998–2023 iText Group NV. All rights reserved.