Skip to main content

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

com.devexpress.system.JavaObject.clone()
com.devexpress.system.JavaObject.equals(java.lang.Object)
com.devexpress.system.JavaObject.hashCode()
com.devexpress.system.JavaObject.memberwiseClone()
com.devexpress.system.JavaObject.toString()
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)

Inheritance

Object
JavaObject
SignatureInfo
AuthoringSignatureInfo
See Also

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; null if the signature does not lock 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.