Latest release (July 2024)

The release of GroupDocs.Signature version 24.7 adds new enhancement.

Full list of changes in this release

KeyCategorySummary
SIGNATURENET-4809EnhancementPDF digital signing with external digital signatures
SIGNATUREJAVA-2877🔧 FixImage layers issue for .dcm format

Major Features

This release include one enhancement:

PDF digital signing with external digital signatures

Utilizing certificates with a Private Key for signing PDF documents ensures secure and legally recognized digital transactions, offering robust protection against tampering and fraud in electronic document workflows. GroupDocs.Signature for Java offers the functionality to add external digital signatures from a key store. You can apply a signature by accepting a certificate provided by a certificate store that contains the Private Key.

🌐 In this release, we’ve added a new constructor to the DigitalSignature class and introduced two new public properties: X509Certificate and PrivateKey to necessary for signing a Pdf document using an external signature .

/// <summary>
/// Sign pdf document with external signature
/// </summary>
Signature signature = new Signature("sample.pdf"))
{
    //Only certificates with private key are good for digital signing
    KeyStore trustStore = KeyStore.getInstance("Windows-My");
    trustStore.load(null, null);
    // Get certificate and key from local key storage using the certificate alias.
    String alias = "ProfMoriarty";
    java.security.cert.X509Certificate certificate = (java.security.cert.X509Certificate) trustStore.getCertificate(alias);
    PrivateKey key = (PrivateKey) trustStore.getKey(alias, null);


    // Create digital signature
    DigitalSignature digitalSignature = new DigitalSignature(certificate, key)
    DigitalSignOptions options = new DigitalSignOptions();
    options.setSignature(digitalSignature);
    // digital certificate details
    options.setReason("Approved");
    options.setContact("John Smith");
    options.setLocation("New York");

SignResult signResult = signature.sign("outputFilePath.pdf", options);
}