Get changes coordinates
Leave feedback
On this page
GroupDocs.Comparison for Python via .NET can compute coordinates for each detected change, allowing you to overlay highlights on preview images.
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:
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.