AuthoringSignatureInfo Class
Contains information about a certification (author) signature.
Declaration
public class AuthoringSignatureInfo extends SignatureInfo
Remarks
A certification signature specifies which changes users can make in the signed document. To certify a document, call the SignatureOptions.setCertificationLevel(value) method to specify a certification level other than CertificationLevel.NO_CERTIFICATION before you sign the document.
Refer to the following help topic for additional information: Sign PDF Documents — PDF Document API for Java.
Example
Get Information About Signatures in a PDF Document
The following code snippet displays information about all signatures in a document:
import java.io.*;
import java.nio.file.*;
import com.devexpress.docs.pdf.*;
public class Main {
public static void main(String[] args) throws Exception {
try (InputStream inputStream = Files.newInputStream(Path.of("Document.pdf"));
PdfDocument pdfDocument = new PdfDocument(inputStream)) {
for (SignatureInfo signature : pdfDocument.getSignatures()) {
System.out.println("Field: " + signature.getField().getName());
System.out.println("Signer: " + signature.getSignerName()
+ ", signed at: " + signature.getSigningTime());
switch (signature) {
case AuthoringSignatureInfo authoring ->
System.out.println("Certification signature. Allowed changes: "
+ authoring.getPermission());
case ApprovalSignatureInfo approval ->
System.out.println("Approval signature. Lock action: "
+ (approval.getFieldLock() != null ? approval.getFieldLock().getAction() : null));
case TimestampSignatureInfo timestamp ->
System.out.println("Document-level timestamp");
default -> { }
}
}
}
}
}
Inherited Members
Inheritance
Methods
getFieldLock() Method
Returns form fields that the signature locks.
Declaration
public FieldLockInfo getFieldLock()
Returns
| Type | Description |
|---|---|
| FieldLockInfo | An object that specifies locked form fields; |
Remarks
Users cannot modify locked fields in the signed document. To lock form fields when you sign a document, call the SignatureField.setLock(value) method.
getPermission() Method
Returns changes that the certification signature allows in the document.
Declaration
public SignaturePermission getPermission()
Returns
| Type | Description |
|---|---|
| SignaturePermission | Allowed changes. |