GroupDocs.Metadata for .NET 21.4 Release Notes

Major Features

There are the following features, enhancements and fixes in this release:

  • Implement metadata property interpreters
  • Implement the ability to edit email fields
  • Image export failed.

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
METADATANET-3752Implement metadata property interpretersNew Feature
METADATANET-3758Implement the ability to edit email fieldsImprovement
METADATANET-3751Image export failedBug

Public API and Backward Incompatible Changes

Implement metadata property interpreters

This new feature allows the user to get a user-friendly interpretation of a metadata property value. Please refer to this article for more information.

Public API changes

The ValueInterpreter class has been added to the GroupDocs.Metadata.Common namespace

The IEnumValueInterpreter interface has been added to the GroupDocs.Metadata.Common namespace

The InterpretedValue property has been added to the MetadataProperty class

The Descriptor property has been added to the MetadataProperty class

The Interpreter property has been added to the PropertyDescriptor class

Use cases

Obtain a full list of properties that provide an interpreted value

foreach (string file in Directory.GetFiles(Constants.InputPath))
{
    using (Metadata metadata = new Metadata(file))
    {
        if (metadata.FileFormat != FileFormat.Unknown && !metadata.GetDocumentInfo().IsEncrypted)
        {
            Console.WriteLine();
            Console.WriteLine(file);
            var properties = metadata.FindProperties(p => p.InterpretedValue != null);
            foreach (var property in properties)
            {
                Console.WriteLine(property.Name);
                Console.WriteLine(property.Value.RawValue);
                Console.WriteLine(property.InterpretedValue.RawValue);
            }
        }
    }
}

Implement the ability to edit email fields

This improvement allows the user to update some common email fields.

Public API changes

A setter has been added to the EmailPackage.Subject property

A setter has been added to the EmailPackage.Recipients property

A setter has been added to the EmailPackage.CarbonCopyRecipients property

A setter has been added to the EmailPackage.BlindCarbonCopyRecipients property

Use cases

Update the email subject and recipients

using (Metadata metadata = new Metadata(Constants.InputEml))
{
    var root = metadata.GetRootPackage<EmailRootPackage>();
    root.EmailPackage.Recipients = new string[] { "sample@aspose.com" };
    root.EmailPackage.CarbonCopyRecipients = new string[] { "sample@groupdocs.com" };
    root.EmailPackage.Subject = "RE: test subject";
    metadata.Save(Constants.OutputEml);
}

Other API changes

The KnowPropertyDescriptors property has been marked as obsolete. Please use the PropertyDescriptors property instead.