GroupDocs.Comparison for Python via .NET Overview
Leave feedback
On this page
What is GroupDocs.Comparison?
GroupDocs.Comparison for Python via .NET is a native Python library that compares 50+ document formats — DOCX, PDF, XLSX, PPTX, OpenDocument, AutoCAD, Visio, images, HTML, and source code — and reports the differences at paragraph, word, and character level, including style and formatting changes. It runs entirely on-premise, requires no Microsoft Office installation, and ships as a pre-built wheel on Windows, Linux, and macOS.
Typical uses include:
Contract and policy review — surface inserted, deleted, and modified clauses between two DOCX or PDF revisions and route only the changed regions to reviewers (or to an LLM) instead of re-reading both documents.
Editorial accept/reject workflows — classify each detected change, then re-emit the document honouring the decisions via apply_changes.
AI-edit audit — compare the document an agent produced against the original to verify and explain every change it made. See Agents and LLM Integration for the full pipeline.
Version-control review — diff two exports of a non-text-friendly format (PPTX, XLSX, Visio, DWG) without flattening the binary.
Multi-source consolidation — diff one source against many targets in a single pass to spot which downstream copy drifted from the canonical version.
Key Capabilities
Capability
Description
50+ comparison formats
DOCX, PDF, XLSX, PPTX, ODT, HTML, images, AutoCAD, Visio, source code, and more. See supported formats.
No cloud calls, no Microsoft Office install, no network traffic.
Quick Example
fromgroupdocs.comparisonimportComparerdefcompare_documents():"""Compare two DOCX revisions and write a tracked-changes result."""withComparer("./source.docx")ascomparer:comparer.add("./target.docx")comparer.compare("./result.docx")if__name__=="__main__":compare_documents()
fromgroupdocs.comparisonimportComparerfromgroupdocs.comparison.optionsimportCompareOptions,LoadOptionsdefcompare_with_options():"""Compare two password-protected DOCX files with style detection
and a summary page appended to the result."""load=LoadOptions()load.password="1234"withComparer("./protected_source.docx",load_options=load)ascomparer:comparer.add("./protected_target.docx",load_options=load)options=CompareOptions()options.detect_style_changes=Trueoptions.generate_summary_page=Trueoptions.sensitivity_of_comparison=75comparer.compare("./result.docx",options)if__name__=="__main__":compare_with_options()
result.docx is the comparison output produced by the compare_documents.py snippet. Download the sample result.
Where to next
Install the package — Installation walks through PyPI installation for Windows, Linux, and macOS.
Run your first comparison — Quick Start Guide compares two DOCX files in five minutes.
Explore the examples — Running Examples clones the runnable repository and runs every documented scenario locally.
Use it in depth — the Developer Guide covers loading, comparing, accepting/rejecting changes, multi-source, folder compare, summary pages, and logging.
Plug it into AI pipelines — Agents and LLM Integration explains the MCP server, AGENTS.md, and how to use Comparison as the change-detection step in agent workflows.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.
On this page
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.