GroupDocs.Signature for .NET 20.5 Release Notes

Major Features

There are about 15 new features, improvements and fixes in this release. New features implement ability to process Presentation documents with electronic digital signatures such as sign document with certificates, verify and search Presentation files for digital signatures. Also few additional features and improvements were implemented with supporting XAdES digital signature types, fixed few bugs and issues. Below the list of most notable changes in release of GroupDocs.Signature for .NET 20.5:

  • Added ability to sign Presentation documents with digital electronic signatures with certificate pfx files.
  • Implemented verification of Presentation document for valid digital signatures
  • Involved support of searching digital signatures with Presentation files
  • Improved and added few data conversion methods when working with Metadata signatures
  • Fixed few issues with result of SignResult data
  • Added XAdES identification when searching for digital signatures in the Spreadsheet documents
  • Fixed few bugs with saving open office document format types
  • Fixed bug with processing Spreadsheet files while digital signing

Full List of Issues Covering all Changes in this Release

KeySummaryIssue Type
SIGNATURENET-2808Implement support of verification for digital signatures for presentations document typesFeature
SIGNATURENET-2806Implement support of search for digital signatures for presentations document typesFeature
SIGNATURENET-2803Implement support of digital signing for presentations document typesFeature
SIGNATURENET-2724Implement Metadata values convertion across various typesFeature
SIGNATURENET-2837Implement property XAdES for Digital SignatureImprovement
SIGNATURENET-2811Set up additional properties for digital signatures in SignResultImprovement
SIGNATURENET-2789Remove support of signing .PSD filesImprovement
SIGNATURENET-2560Implement support XAdES signatures for Spreadsheet documents for .Net StandardImprovement
SIGNATURENET-2280Update using Transparency property of Text and Image OptionsImprovement
SIGNATURENET-2836XAdES type is not defined when reading signed Spreadsheet documents with XAdES signaturesBug
SIGNATURENET-2798Wrong page calculations for .ott documentBug
SIGNATURENET-2797Exception when trying to sign Spreadsheet files with Pfx certificateBug
SIGNATURENET-2796Trial message is cut off for Image documentsBug
SIGNATURENET-2727Digital signing for PDF documents throws exception if signature image is not setBug
SIGNATURENET-2446Signatures (Text/Image/etc) are missing on second page for Word Processing document Ott formatBug

Public Developer Guide examples changes

Following topics from Developer Guide were added

Advanced search for Metadata signatures

Sign document with XAdES Digital signature

Public API and Backward Incompatible Changes

Public class DigitalSignature was updated with new properties and ability to set XAdES type. Supported only for Spreadsheets documents

Public class DigitalSignature was updated with new property.

  • new property XAdESType of type XAdESType was added to specify alternative digital signature format XML Advanced Electronic Signature (see more details here XAdES on Wiki;

New properties of DigitalSignature

    /// <summary>
    /// Contains Digital signature properties.
    /// </summary>
    public class DigitalSignature
    {
        /// <summary>
        /// XAdES type <see cref="XAdESType"/>. Default value is None (XAdES is off).
        /// At this moment XAdES signature type is supported only for Spreadsheet documents.
        /// </summary>
        public XAdESType XAdESType { get; internal set; }
   }

Following example demonstrates how to sign document with digital signature providing selected XAdES type.

Sign document with Digital signature

using (Signature signature = new Signature("sample.xlsx"))
{
    DigitalSignOptions options = new DigitalSignOptions("certificate.pfx")
    {
        // set XAdES type
        XAdESType = XAdESType.XAdES,
        // certificate password
        Password = "1234567890",
        // digital certificate details
        Reason = "Sign",
        Contact = "JohnSmith",
        Location = "Office1"
    };
    SignResult signResult = signature.Sign("signedXades.xlsx", options);
}

Public class MetadataSignature was updated with new conversion methods to retrieve its values with various data types.

Public class MetadataSignature was updated with new data conversion methods

All inherited classes (ImageMetadataSignature, PdfMetadataSignature, PresentationMetadataSignature, SpreadsheetMetadataSignature, WordProcessingMetadataSignature) are extended with there methods.

New methods of MetadataSignature

    /// <summary>
    /// Contains Metadata signature properties.
    /// </summary>
    public abstract class MetadataSignature : BaseSignature
    {
        /// <summary>
        /// Converts to Decimal.
        /// </summary>
        /// <returns>Returns the Metadata Signature value as Decimal.</returns>
        /// <remarks>Throws an exception if the Metadata value could not be converted.
        /// If original value is string based the default culture property info will be used from SignatureSettings properties <see cref="SignatureSettings.DefaultCulture"/>
        /// </remarks>
        public virtual decimal ToDecimal();

        /// <summary>
        /// Converts to Decimal.
        /// </summary>
        /// <returns>Returns the Metadata Signature value as Decimal.</returns>
        /// <param name="provider">Format data provider to use with data conversion operations.</param>
        /// <remarks>Throws an exception if the Metadata value could not be converted</remarks>
        public virtual decimal ToDecimal(IFormatProvider provider);

        /// <summary>
        /// Converts to float.
        /// </summary>
        /// <returns>Returns the Metadata Signature value as float.</returns>
        /// <remarks>Throws an exception if the Metadata value could not be converted.
        /// If original value is string based the default culture property info will be used from SignatureSettings properties <see cref="SignatureSettings.DefaultCulture"/>
        /// </remarks>
        public virtual float ToSingle();

        /// <summary>
        /// Converts to float.
        /// </summary>
        /// <returns>Returns the Metadata Signature value as float.</returns>
        /// <param name="provider">Format data provider to use with data conversion operations.</param>
        /// <remarks>Throws an exception if the Metadata value could not be converted</remarks>
        public virtual float ToSingle(IFormatProvider provider);
 }

Public class PdfDigitalSignature property string Authority was marked as obsolete and will be removed since 20.09 version.

PdfDigitalSignature properties

/// <summary>
/// Contains Pdf Digital signature properties.
/// </summary>
public class PdfDigitalSignature : DigitalSignature
{
        /// <summary>
        /// The name of the person or authority signing the document.
        /// </summary>
        [Obsolete("This property is obsolete and will be removed in the future release (GroupDocs.Signature 20.09).", false)]
        public string Authority { get; set; }
}