PdfFileSignature
Overview
PdfFileSignature is a class in Aspose.Pdf FOSS for Java.
Inherits from: AutoCloseable.
Facade for working with PDF digital signatures.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
signNames | List<String> | Read | Returns the names of all signature fields in the document. |
signatureNames | List<SignatureName> | Read | Returns the names of all signature fields (both signed and unsigned). |
blankSignNames | List<String> | Read | Returns the names of unsigned (blank) signature fields. |
containSignature | boolean | Read | Alias for {@link #containsSignature()} matching the C# {@code IsContainSignature()} name. |
totalRevision | int | Read | Returns the total number of signed revisions in the document. |
Methods
| Signature | Description |
|---|---|
PdfFileSignature() | Creates a new empty {@code PdfFileSignature} instance. |
PdfFileSignature(document: Document) | Creates a {@code PdfFileSignature} bound to the specified document. |
PdfFileSignature(inputFile: String) | Creates a {@code PdfFileSignature} bound to the PDF at {@code inputFile}. |
bindPdf(inputFile: String) | Binds a PDF file to this signature facade. |
bindPdf(inputStream: InputStream) | Binds a PDF from an input stream. |
bindPdf(document: Document) | Binds an existing {@link Document} to this signature facade. |
getSignNames() → List<String> | Returns the names of all signature fields in the document. |
getSignatureNames(onlyActive: boolean) → List<SignatureName> | Returns the names of all signature fields in the document as |
| {@link SignatureName} objects with metadata about whether each field is signed. | |
getSignatureNames() → List<SignatureName> | Returns the names of all signature fields (both signed and unsigned). |
getBlankSignNames() → List<String> | Returns the names of unsigned (blank) signature fields. |
verifySignature(signatureName: SignatureName) → boolean | Verifies the digital signature of the specified signature field. |
verifySignature(signName: String) → boolean | Verifies the digital signature of the specified signature field. |
verifySignature(signName: String, options: ValidationOptions) → boolean | Verifies the digital signature with validation options. |
verifySignature(signName: String, options: ValidationOptions, result: ValidationResult[]) → boolean | Verifies the digital signature with validation options and returns a result. |
verifySignature(signatureName: SignatureName, options: ValidationOptions) → boolean | Verifies the digital signature of the specified {@link SignatureName} with options. |
isContainSignature() → boolean | Alias for {@link #containsSignature()} matching the C# {@code IsContainSignature()} name. |
containsSignature() → boolean | Returns whether the document contains at least one signed signature field. |
isSigned(signName: String) → boolean | Returns whether the specified signature field is signed. |
getReason(signName: String) → String | Returns the signing reason for the specified signature field. |
getLocation(signName: String) → String | Returns the signing location for the specified signature field. |
getSignerName(signName: String) → String | Returns the signer name for the specified signature field. |
getDateTime(signName: String) → Date | Returns the signing date for the specified signature field. |
getContactInfo(signName: String) → String | Returns the contact info for the specified signature field. |
save(outputFile: String) | Saves the bound document to a file. |
save(outputStream: OutputStream) | Saves the bound document to an output stream. |
close() | Closes the signature facade and releases the bound document |
| (if this facade owns it). | |
sign(pageNumber: int, reason: String, contact: String, location: String, visible: boolean, rect: Rectangle, signature: Signature) | Signs the document by creating a new signature field on the given page. |
sign(fieldName: String, signature: Signature) | Signs an existing signature field by name. |
removeSignature(signName: String) | Removes a signature from the specified signature field. |
removeSignature(signName: String, removeField: boolean) | Removes a signature from the specified signature field. |
containsUsageRights() → boolean | Returns whether the document contains usage rights (UR3 dictionary in the document catalog). |
removeUsageRights() | Removes usage rights from the document. |
getTotalRevision() → int | Returns the total number of signed revisions in the document. |
getRevision(signName: String) → int | Returns the 1-based revision number for the specified signature field. |
getRevision(signatureName: SignatureName) → int | Returns the 1-based revision number for the specified signature field. |
isCoversWholeDocument(signName: String) → boolean | Returns whether the byte range of the named signature covers the |
| entire document (i.e. | |
coversWholeDocument(signatureName: SignatureName) → boolean | Returns whether the byte range of the named signature covers the |
| entire document. | |
getReason(name: SignatureName) → String | {@link #getReason(String)} overload taking {@link SignatureName}. |
getLocation(name: SignatureName) → String | {@link #getLocation(String)} overload taking {@link SignatureName}. |
getSignerName(name: SignatureName) → String | {@link #getSignerName(String)} overload taking {@link SignatureName}. |
getDateTime(name: SignatureName) → Date | {@link #getDateTime(String)} overload taking {@link SignatureName}. |
getContactInfo(name: SignatureName) → String | {@link #getContactInfo(String)} overload taking {@link SignatureName}. |