Compare two documents
Comparing documents is often used to track changes made to important documents. Additionally, it is used in editing to compare the modified document version with the original.
Aspose.Words REST API is a powerful document manipulation tool that allows developers to compare two documents and retrieve the differences between them.
As a result of the comparison, a list of differences between the two Word documents is returned. Each difference will contain information about the type of difference (e.g. deleted text, added text, formatting change), the location of the difference in the document, and the text that was added or deleted.
Compare two documents REST API
You can use the following parameters in a REST request:
|Parameter Name||Data Type||Required/Optional||Description|
||string||Optional||Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.|
||string||Optional||Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don’t recommend to use the parameter to pass a plain password for direct call of API.|
||string||Optional||Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.|
||string||Optional||Result path of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.|
||string||Optional||encrypted password for the second document.|
$multipart/form-data request to combine one or more properties into a single body:
|Property Name||Data Type||Required/Optional||Description|
||string(binary)||Optional||The comparing document.|
Compare two documents usage examples
How to compare twodocuments with cURL or Postman
One of the easiest and fastest ways to call a REST API is to use cURL or Postman:
Using SDK is the quickest way to speed up the development. Please take a look at the provided code examples to quickly call this web service from your favourite programming language:
- GitHub repository — explore Aspose.Words Cloud SDK Family. These software libraries take care of all low-level document-processing details.