GroupDocs.Signature for .NET 21.6 Release Notes

Major Features

This release contains improvement on obtaining Document information, adding new Spreadsheet format files to support, important fixes with Digital signatures deletion and few bug fixes. Below the list of most notable changes in release of GroupDocs.Signature for .NET 21.6:

  • Implemented ability to exclude Deleted Signatures from Document information.
  • Word Processing document issue with saving digital signatures was fixed.
  • The issues with deleting Digital signatures in Word Processing and Spreadsheet files were fixed.
  • Added support of Spreadsheet formats XLT and XLTM.
  • Improvements were made to run sign processing with multiple threads.
  • Implemented metadata adjustments ehn midifying documents.
  • Few other minor bugs were fixed.

Full List of Issues Covering all Changes in this Release

KeySummaryIssue Type
SIGNATURENET-3493Update Image signatures modification to adjust metadata layoutFeature
SIGNATURENET-3492Update Text signatures modification to adjust metadata layoutFeature
SIGNATURENET-3458Implement ability to exclude Deleted Signatures from Document informationFeature
SIGNATURENET-3494Update QR-code/Barcode signatures modification to adjust metadata layoutImprovement
SIGNATURENET-3483Extend IDocumentInfo interface with new property to keep list of all existing SignaturesImprovement
SIGNATURENET-3457Words Processing document does not have information about Digital SignaturesBug
SIGNATURENET-3456Remove digital signature from Word and ExcelImprovement
SIGNATURENET-3412Excel file is not supported (XLT format)Improvement
SIGNATURENET-3455Localized string error for MetaInfo dataBug
SIGNATURENET-3364Multiple calls issue in .NET in parallel multi-threadsBug
SIGNATURENET-2886File preview raises unexpected “Damaged file” exceptionBug

Public API and Backward Incompatible Changes

New public static FileType FileType were added to support new Spreadsheet file formats

These FileType static objects describe new supported Spreadsheet document types.

New public static objects

    public sealed class FileType
    {
        /// <summary>
        /// Excel binary Temlpate (.xlt) represents Excel Temlpate File Format.
        /// Learn more about this file format <a href="https://wiki.fileformat.com/spreadsheet/xlt">here</a>. 
        /// </summary>
        public static readonly FileType XLT = new FileType("Excel Template file", ".xlt");

        /// <summary>
        /// Excel Office OpenXML file Temlpate (.xltm) represents Excel Temlpate File Format.
        /// Learn more about this file format <a href="https://wiki.fileformat.com/spreadsheet/xltm">here</a>. 
        /// </summary>
        public static readonly FileType XLTM = new FileType("Excel Template file", ".xltm");
    };

Public class SignatureSettings was updated with new property that allow to exclude deleted Signatures from Document information result

Public class SignatureSettings was updated with property

  • property bool [ShowDeletedSignaturesInfo] that allows to specify if deleted Signature information should be included into the Document Information structure. By default this value is enabled.

New property of SignatureSettings class

    public class SignatureSettings
    {
        /// <summary>
        /// Gets or sets flag that includes deleted signatures into Document Info result.
        /// Each Signature <see cref="BaseSignature"/> has Deleted flag <see cref="BaseSignature.Deleted"/> to detect if it was deleted.
        /// </summary>
        public bool ShowDeletedSignaturesInfo { get; set; } = true;
   }

Public interface IDocumentInfo was extended with new property Signatures

Public interface IDocumentInfo was extended with new property Signatures.

  • Signatures property as IList of BaseSignature objects to keep the list of all document signatures.

New property Signatures of IDocumentInfo interface

    /// <summary>
    ///  Defines document description properties.
    /// </summary>
    public interface IDocumentInfo
	{
        /// <summary>
        /// Collection of document all types signatures <see cref="BaseSignature"/>.
        /// </summary>
        IList<BaseSignature> Signatures { get; }
	}

Public class DocumentInfo was extended with new property Signatures

Public interface DocumentInfo was extended with new property Signatures to keep the list of document signatures of all types.

New property Signatures of DocumentInfo class

    public class DocumentInfo : IDocumentInfo
	{
        ...
        /// <summary>
        /// Collection of document all types signatures <see cref="BaseSignature"/>.
        /// </summary>
        public IList<BaseSignature> Signatures { get; }
	}

Following example demonstrates how to obtain information about actual document signatures.

Get Document extended information

public static void Run()
{
    // define Signature settings to remove Deleted signatures from the list
    SignatureSettings signatureSettings = new SignatureSettings()
    {
        ShowDeletedSignaturesInfo = false
    };
    using (Signature signature = new Signature("signed.pdf", signatureSettings))
    {
        IDocumentInfo documentInfo = signature.GetDocumentInfo();
        
        // display all document signatures information without deleted ones
        Console.WriteLine($"Document actual Signatures : {documentInfo.Signatures.Count}");
        foreach (BaseSignature baseSignature in documentInfo.Signatures)
        {
            Console.WriteLine(
                $" - #{baseSignature.SignatureId}: Type: {baseSignature.SignatureType} Location: {baseSignature.Left}x{baseSignature.Top}. " +
                $"Size: {baseSignature.Width}x{baseSignature.Height}. " +
                $"CreatedOn/ModifiedOn: {baseSignature.CreatedOn.ToShortDateString()} / {baseSignature.ModifiedOn.ToShortDateString()}");
        }                
        
        // display document process history information
        Console.WriteLine($"Document Process logs information: count = {documentInfo.ProcessLogs.Count}");
        foreach (ProcessLog processLog in documentInfo.ProcessLogs)
        {
            Console.WriteLine($" - operation [{processLog.Type}] on {processLog.Date.ToShortDateString()}. Succedded/Failed {processLog.Succeeded}/{processLog.Failed}. Message: {processLog.Message} : ");
            if (processLog.Signatures != null)
            {
                foreach (BaseSignature logSignature in processLog.Signatures)
                {
                    Console.WriteLine($"\t\t -{logSignature.SignatureType} #{logSignature.SignatureId} at {logSignature.Top} x {logSignature.Left} pos;");
                }
            }
        }
    }
}