GroupDocs.Parser for .NET 21.5 Release Notes

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
PARSERNET-1776Implement Text property for FieldData classImprovement
PARSERNET-1804Implement data extraction from RAR archivesNew Feature
PARSERNET-1805Implement data extraction from TAR archivesNew Feature
PARSERNET-1806Implement data extraction from BZip2 compressed filesNew Feature
PARSERNET-1807Implement data extraction from GZip compressed filesNew Feature
PARSERNET-1780GetDocumentInfo().FileType.Extension returns wrong extension for RARBug

Public API and Backward Incompatible Changes

Implement Text property for FieldData class

Description

This improvement enhanced the work with text fields.

Public API changes

GroupDocs.Parser.Data.FieldData public class was updated with changes as follows:

Usage

The following example how to extract data from text fields:

// Get the field data
FieldData field = data[i];
// Check if the field data contains a text
if(field.PageArea.Text != null)
{
    // Print the field text value
    Console.WriteLine(field.Text);
}

Implement data extraction from TAR and RAR archives

Description

This feature allows to extract documents from TAR and RAR archives.

Public API changes

GroupDocs.Parser.Options.FileType public class was updated with changes as follows:

  • Added ZIP and RAR readonly static fields.

Usage

The following example shows how to extract documents from the archive:

// Create an instance of Parser class
using(Parser parser = new Parser(filePath))
{
    // Extract attachments from the container
    IEnumerable<ContainerItem> attachments = parser.GetContainer();
    // Check if container extraction is supported
    if(attachments == null)
    {
        Console.WriteLine("Container extraction isn't supported");
    }

    // Iterate over attachments
    foreach(ContainerItem item in attachments)
    {
        // Print an item name and size
        Console.WriteLine(string.Format("{0}: {1}", item.Name, item.Size));
    }
}

Implement data extraction from GZip and BZip2 archives

Description

This feature allows to extract documents from GZip and BZip2 archives.

Public API changes

GroupDocs.Parser.Options.FileType public class was updated with changes as follows:

  • Added GZ and BZ2 readonly static fields.

Usage

Data extraction from GZip and BZip2 archives is performed transparently for a user. Parser object is created only for extracted file. For example, compressed TAR is extracted from TAR.GZ file and Parser object is created for TAR container.

The following example shows how to extract documents from the TAR.GZ archive:

// Create an instance of Parser class
using(Parser parser = new Parser("file.tar.gz"))
{
    // Extract attachments from the container
    IEnumerable<ContainerItem> attachments = parser.GetContainer();
    // Check if container extraction is supported
    if(attachments == null)
    {
        Console.WriteLine("Container extraction isn't supported");
    }

    // Iterate over attachments
    foreach(ContainerItem item in attachments)
    {
        // Print an item name and size
        Console.WriteLine(string.Format("{0}: {1}", item.Name, item.Size));
    }
}