How to Compare Invoices
Sometimes you need to achieve maximum accuracy in comparing files. Suppose you have two versions of an important document, and you need to find differences character-by-character or the opposite case, you need to compare the documents, but the details are not important to you, and you only need words that have changes. GroupDocs.Comparison provides the ability to compare documents with sensitivity settings
For example, there are two invoices in the DOCX format and you need to compare their contents with the maximum level of detail and comparison sensitivity.
|Source Invoice||Target Invoice|
The following are the steps to compare two DOCX files with specific settings of detalization level andcomparison sensitivity.
- Instantiate Comparer object with source document path or stream;
- Call add method and specify target document path or stream;
- Instantiate CompareOptions object with desired setSensitivityOfComparison and setDetalisationLevel value;
- Call compare method and pass CompareOptions object to method.
The following code samples demonstrate how to compare two DOCX files.
As a result, we get a DOCX file where the deleted elements are marked in red, the added – in blue, and the modified – in green
Advanced Usage Topics
To learn more about document comparison features, please refer to the advanced usage section.
You may easily run the code above and see the feature in action in our GitHub examples:
- GroupDocs.Comparison for Java examples, plugins, and showcase
- GroupDocs.Comparison for .NET examples, plugins, and showcase
- Document Comparison for Java App Dropwizard UI Modern Example
- Document Comparison for Java Spring UI Example
- Document Comparison for .NET MVC UI Example
- Document Comparison for .NET App WebForms UI Modern Example
Free Online App
Along with full-featured Java library we provide simple, but powerful free Apps. You are welcome to compare your DOC or DOCX, XLS or XLSX, PPT or PPTX, PDF, EML, EMLX, MSGand other documents with free to use online GroupDocs Comparison App.