public class SignatureUtil extends Object
Constructor and Description |
---|
SignatureUtil(com.itextpdf.kernel.pdf.PdfDocument document)
Creates a SignatureUtil instance.
|
Modifier and Type | Method and Description |
---|---|
static long[] |
asLongArray(com.itextpdf.kernel.pdf.PdfArray pdfArray)
Deprecated.
Will be removed in 7.2. Use
PdfArray.toLongArray() instead |
boolean |
doesSignatureFieldExist(String name)
Checks whether a name exists as a signature field or not.
|
InputStream |
extractRevision(String field)
Extracts a revision from the document.
|
List<String> |
getBlankSignatureNames()
Gets the field names that have blank signatures.
|
int |
getRevision(String field) |
PdfSignature |
getSignature(String name) |
com.itextpdf.kernel.pdf.PdfDictionary |
getSignatureDictionary(String name)
Gets the signature dictionary, the one keyed by /V.
|
List<String> |
getSignatureNames()
Gets the field names that have signatures and are signed.
|
int |
getTotalRevisions() |
String |
getTranslatedFieldName(String name) |
boolean |
signatureCoversWholeDocument(String name)
Checks if the signature covers the entire document (except for signature's Contents) or just a part of it.
|
PdfPKCS7 |
verifySignature(String name)
Verifies a signature.
|
PdfPKCS7 |
verifySignature(String name,
String provider)
Verifies a signature.
|
public SignatureUtil(com.itextpdf.kernel.pdf.PdfDocument document)
document
- PdfDocument to be inspected@Deprecated public static long[] asLongArray(com.itextpdf.kernel.pdf.PdfArray pdfArray)
PdfArray.toLongArray()
insteadPdfArray
to an array of longspdfArray
- PdfArray to be convertedpublic PdfPKCS7 verifySignature(String name)
PdfPKCS7
object.name
- String the signature field namepublic PdfPKCS7 verifySignature(String name, String provider)
PdfPKCS7
object.name
- the signature field nameprovider
- the provider or null for the default providerpublic PdfSignature getSignature(String name)
public com.itextpdf.kernel.pdf.PdfDictionary getSignatureDictionary(String name)
name
- the field namenull
if the field is not
a signaturepublic List<String> getSignatureNames()
public List<String> getBlankSignatureNames()
public int getTotalRevisions()
public int getRevision(String field)
public InputStream extractRevision(String field) throws IOException
field
- the signature field nameIOException
public boolean signatureCoversWholeDocument(String name)
name
- the signature field namepublic boolean doesSignatureFieldExist(String name)
name
- name of the fieldCopyright © 1998–2019 iText Group NV. All rights reserved.