Save Comparison Result in a Different Format
Leave feedback
On this page
The simplest way to control the output format of a comparison is to pick a result file path with the matching extension. GroupDocs.Comparison infers the output format from the extension and produces a result file in that format.
Example: Export a DOCX vs DOCX diff to PDF
fromgroupdocs.comparisonimportComparerdefsave_comparison_result_in_different_format():withComparer("./source.docx")ascomparer:comparer.add("./target.docx")# Output is inferred from the file extension — .pdf in this case.comparer.compare("./result.pdf")if__name__=="__main__":save_comparison_result_in_different_format()
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.