DEV Community

GroupDocs
GroupDocs

Posted on

Compare files and charts, detect styles in PowerPoint Slides using C# .NET API

New monthly release of the document comparison .NET API includes some key enhancements and an important bug fix. With the latest release, application developers can compare charts and detect styles while working with Microsoft PowerPoint presentations within their .NET apps. A bug related to the use of auto shapes has been fixed for Slides files thus offering a refined usage experience. Comparison tester feature improvement in Microsoft Word documents is another highlight of version 18.11 of GroupDocs.Comparison for .NET API – http://bit.ly/2SRtb8s

Below code example demonstrates how you can compare two documents and save them to a single file:

    public static void CompareDcumentsFromStreamToOutputFile()
    {
        // Create two streams of documents
        Stream sourceStream = File.Open(Path.Combine(Common.sourcePath, Common.sourceFile), FileMode.Open, FileAccess.Read);
        Stream targetStream = File.Open(Path.Combine(Common.targetPath, Common.targetFile), FileMode.Open, FileAccess.Read);

        // Get instance of GroupDocs.Comparison.Comparer and call method Compare.
        GroupDocs.Comparison.Comparer comparison = Common.getComparison();
        ICompareResult result = comparison.Compare(sourceStream, targetStream, new ComparisonSettings { DeletedItemsStyle = new StyleSettings { StrikeThrough = true }, GenerateSummaryPage = true, DetailLevel = DetailLevel.Hight });

        // save result document to a file.
        result.SaveDocument(Path.Combine(Common.resultPath, Common.resultFile));

        sourceStream.Close();
        targetStream.Close();
    }

YouTube video tutorials of the GroupDocs API – http://bit.ly/2RZOfcG

Latest comments (0)