Get changes coordinates

GroupDocs.Comparison for Python via .NET can compute coordinates for each detected change, allowing you to overlay highlights on preview images.

Get coordinates for detected changes

Enable coordinate calculation and inspect the Box values from each change.

import groupdocs.comparison as gc

with gc.Comparer("source.docx") as comparer:
    comparer.add("target.docx")
    options = gc.CompareOptions()
    options.calculate_coordinates = True
    comparer.compare(options)
    changes = comparer.get_changes()
    for change in changes:
        print(f"Type: {change.type}, X: {change.box.x}, Y: {change.box.y}, Text: {change.text}")

🔹 Use case: Draw bounding boxes over preview images to visualize change locations.

The result is as follows:

Close
Loading

Analyzing your prompt, please hold on...

An error occurred while retrieving the results. Please refresh the page and try again.