GroupDocs.Signature for Java 23.4 Release Notes

Major Features

The main features of this release are improvements with logging, fixes the issues under Linux platform and new property DataType of the metadata signatures. The updates with logging are related to extended messages for Trace log level that allow to log information events. Also of this release is the implementation of the process metrics that provides statistic on processing time, incoming and outgoing document size, the number of signatures, etc. The IResult interface was enhanced to implement these values. Also, the release includes the changes to fix the Word Processing preview on Linux platforms, fix on Spreadsheet page size calculation and correction on forming the PNG output format when exporting the document pages as images. Below the list of most notable changes in release of GroupDocs.Signature for Java 23.4:

  • Fixed the error with previewing Word Processing documents on the Linux platform
  • Fixed unexpected QRCode Signature verification result under Linux OS
  • Detection of PFX Certificate files were recognized properly
  • Log Level enumeration was provided to limit the logging messages events
  • Implement new DataType property of the MetadataSignature class.
  • Implement detailed Trace messages for logging of the most methods.
  • Provide Log Level flags enumeration to specify multiple log levels processing.
  • Process metrics were implemented for Sign, Update, Delete, Search and Verify methods
  • Fixed the exception by previewing the Word Processing document in Jpg format
  • Document export as image method was fixed to provide accurate PNG format files
  • The Page size property of the DocumentInfo was fixed for Spreadsheet documents
  • Trace logging was extended with informational messages for each method of working with a particular signature
  • Referenced libraries and dependencies were updated

Added new enumeration LogLevel to specify the level of logging witing the SignatureSettings new LogLevel propert

The following example demonstrates how to setup standard or custom logging.

public static void run()
{
    LoadOptions loadOptions = new LoadOptions();
    loadOptions.setPassword("12345678901");
    // use standard console logger
    ConsoleLogger logger = new ConsoleLogger();
    SignatureSettings settings = new SignatureSettings(logger);
    settings.setLogLevel(LogLevel.Error | LogLevel.Warning);
    try
    {
        // create the Signature instance with the Signature settings
        Signature signature = new Signature("sample.pdf", loadOptions, settings);
        {
            QrCodeSignOptions options = new QrCodeSignOptions("Sample1");

            // sign document to file
            signature.sign(outputFilePath, options);
        }
    }
    catch(java.lang.RuntimeException e)
    {
        // skip the Exception - check the log
    }
    System.out.print("\nSource document signed successfully.\nFile saved at "+  outputFilePath);
}

SignResult implements product metrics properties of the IResult interface

The following example demonstrates how to analyze IResult metrics.

public static void run()
{
    Signature signature = new Signature("sample.pdf");
    {
        // create QRCode option with predefined QRCode text
        QrCodeSignOptions options = new QrCodeSignOptions("JohnSmith");

        // sign document to file
        SignResult signResult = signature.sign("output.pdf", options);

        // analyze SignResult (IResult properties)
        System.out.print("Sign-process was executed for "+signResult.getProcessingTime()+" mls");
        System.out.print("Input document size "+signResult.getSourceDocumentSize()+" bytes");
        System.out.print("Output document size "+signResult.getDestinDocumentSize()+" bytes");
        System.out.print("Total processed signatures "+signResult.getTotalSignatures());
        if (signResult.getFailed().size() == 0)
        {
            System.out.print("\nAll signatures were successfully created!");
        }
        else
        {
            System.out.print("Successfully created signatures : "+signResult.getSucceeded().size());
            System.out.print("Failed signatures : "+signResult.getFailed().size());
        }
        System.out.print("\nList of newly created signatures:");
        int number = 1;
        for (BaseSignature temp : signResult.getSucceeded())
        {
            System.out.print("Signature #"+ +number++ +": Type: "+temp.getSignatureType()+" Id:"+temp.getSignatureId()+", Location: "+temp.getLeft()+"x"+temp.getTop()+". Size: "+temp.getWidth()+"x"+temp.getHeight());
        }
    }
}

Full List of Issues Covering all Changes in this Release

KeySummaryIssue Type
SIGNATURENET-4206Error with previewing Word Processing documents on the Linux platformBug
SIGNATURENET-4157QRCode Signature verification result differs from expected (Linux platform)Bug
SIGNATURENET-4147Some PFX Certificate documents are not recognized properlyBug
SIGNATURENET-4155Implement Log Level settings to limit the logging messages eventsFeature
SIGNATURENET-4138Implement DataType property of the MetadataSignature classEnhancement
SIGNATURENET-4115Implement detailed Trace messages for logging of the most methodsEnhancement
SIGNATURENET-4110Provide Log Level flags enumeration to specify multiple log levels processingEnhancement
SIGNATURENET-4259Exported PNG images from the documents have a corrupted formatBug
SIGNATURENET-4222The Page size property of the DocumentInfo is wrong for Spreadsheet filesBug
SIGNATURENET-4006.Net Core : Preview Word Processing document in Jpg format gives unexpected exceptionBug
SIGNATURENET-4150Implement process method metrics to all product methodsFeature
SIGNATURENET-4260Extend trace level logging messages for each particular signature processing for Sign, Update, Delete, Search and Verify methodsEnhancement

Public Developer Guide examples changes

The following topics from Developer Guide were added

Sign document with result analysis

Public API and Backward Incompatible Changes

Public interface IResult was updated with following properties

Property [getProcessingTime] of type long return the execution time of the process in milliseconds. Property [getTotalSignatures] of type int return the total processed signatures. Property [getSourceDocumentSize] of type long return the input document length in bytes. Property [getDestinDocumentSize] of type long return the output document length in bytes.

Public classes SignResult, UpdateResult, DeleteResult were updated with following properties to implement IResult interface

Property [getProcessingTime] of type long return the execution time of the process in milliseconds. Property [getTotalSignatures] of type int return the total processed signatures. Property [getSourceDocumentSize] of type long return the input document size in bytes. Property [getDestinDocumentSize] of type long return the output (signed/modified/saved) document size in bytes.

Public classes VerificationResult and SearchResult were updated to implement IResult interface and support following properties

Property [getProcessingTime] of type long return the execution time of the Sign process in milliseconds. Property [getTotalSignatures] of type int return the total processed signatures. Property [getSourceDocumentSize] of type long return the input document size in bytes. Property [getDestinDocumentSize] of type long for Verify and Search method always returns zero. Property [getSucceeded] as List of [BaseSignature] objects keeps the list of processed successfully signatures for Search method. This property does not yet supported for Verify method. Property [getFailed] as List of [BaseSignature] objects keeps the list of failed signatures. This property currently does not supported for Verify and Search methods.