public class SignatureUtil extends Object
Constructor and Description |
---|
SignatureUtil(PdfDocument document)
Creates a SignatureUtil instance.
|
Modifier and Type | Method and Description |
---|---|
static long[] |
asLongArray(PdfArray pdfArray)
Converts a PdfArray to an array of longs
|
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) |
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 or just part of it.
|
PdfPKCS7 |
verifySignature(String name)
Verifies a signature.
|
PdfPKCS7 |
verifySignature(String name, String provider)
Verifies a signature.
|
public SignatureUtil(PdfDocument document)
document
- PdfDocument to be inspected
public PdfPKCS7 verifySignature(String name)
PdfPKCS7
object.
name
- String the signature field name
public PdfPKCS7 verifySignature(String name, String provider)
PdfPKCS7
object.
name
- the signature field name
provider
- the provider or null for the default provider
public PdfSignature getSignature(String name)
public PdfDictionary getSignatureDictionary(String name)
name
- the field name
null
if the field is not a signature
public 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 name
IOException
public boolean signatureCoversWholeDocument(String name)
name
- the signature field name
public boolean doesSignatureFieldExist(String name)
name
- name of the field
Copyright © 1998–2017 iText Group NV. All rights reserved.