GroupDocs.Parser for .NET 21.2 Release Notes

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
PARSERNET-1734Improve text page extraction from WordProcessing documentsImprovement
PARSERNET-1722Remove GetText method from TocItem classImprovement
PARSERNET-1484Text isn’t extracted in raw modeBug
PARSERNET-1711Detected package downgrade: System.Reflection.Emit.ILGenerationBug
PARSERNET-1724No results from landscape page of a Word documentBug
PARSERNET-1731Searching text with highlights is not showing all the occurrences in the DOCX fileBug
PARSERNET-1732Search returns wrong PageIndex for DOCX if Header/FooterBug

Public API and Backward Incompatible Changes

Improve text page extraction from WordProcessing documents

Description

This improvement enhanced the work with documents that contain sections, footers, headers and footnotes.

Public API changes

No API changes.

Remove GetText method from TocItem class

Description

Removed the obsolete TocItem.GetText method. Use TocItem.ExtractText method instead.

Public API changes

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

  • Removed GetText method

Usage

The following example how to extract a text by the an item of table of contents:

// Create an instance of Parser class
using (Parser parser = new Parser(Constants.SampleDocxWithToc))
{
    // Get table of contents
    IEnumerable<TocItem> tocItems = parser.GetToc();
    // Check if toc extraction is supported
    if (tocItems == null)
    {
        Console.WriteLine("Table of contents extraction isn't supported");
    }
    // Iterate over items
    foreach (TocItem tocItem in tocItems)
    {
        // Print the text of the chapter
        using (TextReader reader = tocItem.ExtractText())
        {
            Console.WriteLine("----");
            Console.WriteLine(reader.ReadToEnd());
        }
    }
}