Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// For complete examples and data files, please go to https://github.com/groupdocs-comparison/GroupDocs.Comparison-for-.NET
Comparer comparer = new Comparer();
//compare document
ICompareResult result = comparer.Compare(Path.Combine(Common.sourcePath, Common.sourceFile), Path.Combine(Common.targetPath, Common.targetFile), new ComparisonSettings { StyleChangeDetection = true, ShowDeletedContent = true, GenerateSummaryPage = true });
result.SaveDocument(Path.Combine(Common.resultPath, Common.resultFile));
//get list of pages
List<PageImage> resultImages = comparer.ConvertToImages(Path.Combine(Common.resultPath, Common.resultFile));
//save them as bitmap to separate folder
if (!Directory.Exists(Common.resultPath + @"/Result Pages"))
Directory.CreateDirectory(Common.resultPath + @"/Result Pages");
foreach (PageImage image in resultImages)
{
Bitmap bitmap = new Bitmap(image.PageStream);
bitmap.Save(Common.resultPath + @"/Result Pages/result_" + image.PageNumber + ".png");
bitmap.Dispose();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.