Compare documents from local disk and specify file type manually
Explicitly set input FileType when the extension is ambiguous or missing.
importgroupdocs.comparisonasgcsource_path="source.docx"target_path="target.docx"result_path="result.docx"# Create load options and set the file typeload_options=gc.LoadOptions()load_options.file_type=gc.FileType.DOCXwithgc.Comparer(source_path,load_options)ascomparer:comparer.add(target_path,load_options)comparer.compare(result_path)
🔹 Use case: Process files with incorrect or missing extensions by forcing the correct type.
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.
On this page
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.