Show Revisions

GroupDocs.Comparison for Python via .NET lets you toggle the visibility of inline revision markers in the result. Disable them when you want a clean deliverable for end users.

Example: Hide revisions in the result

from groupdocs.comparison import Comparer
from groupdocs.comparison.options import CompareOptions

def hide_revisions():
    with Comparer("./source.docx") as comparer:
        comparer.add("./target.docx")
        options = CompareOptions()
        options.show_revisions = False
        comparer.compare("./result.docx", options)

if __name__ == "__main__":
    hide_revisions()

source.docx is the source file used in this example. Click here to download it.

target.docx is the target file used in this example. Click here to download it.

Binary file (DOCX, 25 KB)

Download full output

Use case: produce a clean deliverable without inline revision markers for end users.

The result is as follows:

Disabled revisions display

Interaction with other options

  • word_track_changes — when set to True, GroupDocs writes diffs as Word Track Changes revisions. show_revisions = False then hides those revision markers in the rendered output but keeps them in the underlying document XML — opening the result in Word with track-changes UI enabled will still show them.
  • revision_author_name — only meaningful when show_revisions = True. With revisions hidden, the author name is recorded but invisible.
  • leave_gaps — orthogonal: gap lines apply to inserted/deleted content blocks, not to revision markers.
Close
Loading

Analyzing your prompt, please hold on...

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