GroupDocs.Parser for .NET 22.8 Release Notes

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
PARSERNET-1906Implement the support for 7z archivesNew Feature
PARSERNET-1903Implement the support for attachment extraction from presentationsNew Feature
PARSERNET-1904Implement the support for attachment extraction from spreadsheetsNew Feature
PARSERNET-1905Implement the support for attachment extraction from word processing documentsNew Feature
PARSERNET-1907ParserGetContainer details in API reference page is ambiguousBug
PARSERNET-1908New file format supportNew Feature

Public API and Backward Incompatible Changes

Implement the support for 7z archives

Description

This feature provides the ability to extract data from 7z archives.

Public API changes

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

Usage

The following example shows how to extract a text from 7z entities:

// 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 7z entities
    foreach (ContainerItem item in attachments)
    {
        // Print the file path
        Console.WriteLine(item.FilePath);
        try
        {
            // Create Parser object for the 7z entity content
            using (Parser attachmentParser = item.OpenParser())
            {
                // Extract an 7z entity text
                using (TextReader reader = attachmentParser.GetText())
                {
                    Console.WriteLine(reader == null ? "No text" : reader.ReadToEnd());
                }
            }
        }
        catch (UnsupportedDocumentFormatException)
        {
            Console.WriteLine("Isn't supported.");
        }
    }
}

Implement the support for attachment extraction from presentations, spreadsheets and word processing documents

Description

These features provide the ability to extract attachments from documents.

Public API changes

No public API changes.

Usage

The following example shows how to extract a text from document attachments:

// 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 attachment entities
    foreach (ContainerItem item in attachments)
    {
        // Print the file path
        Console.WriteLine(item.FilePath);
        try
        {
            // Create Parser object for the attachment entity content
            using (Parser attachmentParser = item.OpenParser())
            {
                // Extract an attachment entity text
                using (TextReader reader = attachmentParser.GetText())
                {
                    Console.WriteLine(reader == null ? "No text" : reader.ReadToEnd());
                }
            }
        }
        catch (UnsupportedDocumentFormatException)
        {
            Console.WriteLine("Isn't supported.");
        }
    }
}

New file format support

Description

This feature provides the ability to extract data from 7z archives and attachments from presentations, spreadsheets and word processing documents.

ParserGetContainer details in API reference page is ambiguous

Description

Public API reference was updated: the link to the supported formats page was added.