GroupDocs.Comparison at a glance

An API to compare popular document types such as PDF, Microsoft Office, HTML, emails, or images within Python applications.

Illustration comparison

Detailed Output Reports

GroupDocs.Comparison identifies changes in document content (characters, words, paragraphs, tables, charts) as well as changes in document style. It provides users with a report containing detailed information about differences, including their number and type.

Supports Popular File and Document Formats

With the GroupDocs.Comparison API, you can efficiently compare documents in formats like PDF, HTML, email, Microsoft Office Word, Excel spreadsheets, PowerPoint presentations, OneNote, Visio diagrams, text files, JPEG, PNG, GIF, BMP images, and many other formats.

Comprehensive Documentation and Examples

Extensive documentation and code examples for using the Comparison library on different platforms are available, making it easy to integrate GroupDocs.Comparison API into your Python application.

Select and Merge Changes into One File

If you have different versions of a document, you can select specific changes and compile a new document using the GroupDocs.Comparison library.

Platform independence

GroupDocs.Comparison for Python via .NET supports the following operating systems, frameworks, and package managers

Windows
macOS
Linux
NPM
NuGet
Amazon
Docker
Azure
VS Code
Eclipse
IntelliJ

Supported file formats

GroupDocs.Comparison for Python via .NET supports operations with the following file formats.

Microsoft Office & OpenDocument formats

  • Word: DOCX, DOC, DOCM,DOT, DOTM, DOTX, RTX, RTF, TXT
  • Excel: XLSX, XLS, XLT, XLTM, XLSB, XLSM
  • PowerPoint: PPTX, PPT, POT, POTX, PPS, PPSX
  • Outlook: EML, EMLX, MSG
  • OneNote: ONE
  • OpenDocument: ODT, ODP, OTP, ODS, OTT
  • Fixed Page Layout: PDF

Images, Graphics & Diagrams

  • Raster images: BMP, GIF, JPG, JPEG, PNG
  • Medical Imaging: DICOM
  • Microsoft Visio: VSDX, VSD, VSS, VST, VDX
  • AutoCAD Drawing: DWG, DXF

Other

  • Text: TXT
  • Programming Languages: CS, Java, CPP, JS, PY, RB, PL, ASM, GROOVY, JSON, PHP, SQL, LOG, DIFF, LESS, SCALA
  • Web: HTM, HTML, MHT, MHTML
  • e-Books: MOBI, DjVu
  • Delimiter-Separated Values: CSV

GroupDocs.Comparison for Python via .NET Features

Easily compare PDF and Office documents, images, and other formats.

Feature icon

User-Friendly Document Comparison

Analyze and identify differences between two documents.

Feature icon

Compare Multiple Documents

Analyze and identify differences within multiple documents simultaneously.

Feature icon

Supported Formats

Supports more than 50 popular document formats from various categories.

Feature icon

Accept or Reject Changes

Clear visual representation of identified changes, with the option to accept or reject modifications.

Feature icon

Generate Previews

Save the comparison results as images.

Feature icon

Content Comparison

Compare text content line-by-line, by paragraphs, by words, or by characters. Highlight the changes.

Feature icon

Style Comparison

Detect changes in formatting and styles.

Feature icon

Set Metadata

Retain metadata from either the source or target files, or allow it to be specified by users.

Feature icon

Password Protection

Analyze encrypted documents, or secure the resulting document with a password.

Feature icon

Compare Specific Pages

Load and compare specific sections or pages of a document.

Feature icon

Display Comments

Choose to hide or show comments when loading the source document.

Code samples

Explore typical use cases of GroupDocs.Comparison for Python via .NET operations

Comparing Password-Protected Documents

To compare documents that are protected with a password, you need to specify the password when loading the documents:

How to compare password-protected documents.

def run():

    # Load the source document and specify its password
    with groupdocs.comparison.Comparer("source.docx", new LoadOptions("1234")) as comparer:

        # Load the target document and specify its password
        comparer.add("target.docx", new LoadOptions("5678"));

        # Save comparison result to a specified file
        comparer.compare("result.docx");

Comparing multiple PDF documents.

GroupDocs.Comparison allows you to compare more than two documents. The operation is almost the same as when comparing two files. You just need to add more target files to the comparer class.

How to compare three or more documents.

def run():

    # Load the source document
    with groupdocs.comparison.Comparer(source.pdf") as comparer:

        # Specify the second file for comparison
        comparer.add("target2.pdf");

        # Specify the third file for comparison
        comparer.add("target3.pdf");

        # Save comparison result to a specified file
        comparer.compare("result.pdf");
 English