DEV Community

GroupDocs
GroupDocs

Posted on

2

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

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more