We're sorry AsposeCloud doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.cloud

Compare Two Word Files and Highlight Differences Without MS Word in Docker Container

Hi,

I am a developer who must look for a document compare solution to be integrated with our web application. I tried your cloud API and it fits our needs. The only thing that is left is, that our customers need an onPremise / self hosted solution.
I found on your website, that you offer docker images for this purpose, but I could not find out if it supports the document comparison. The description on docker hub states some features and “So many more features.”.

Does it support document comapre and if not is it planed to be implemented soon?

Regards,
Markus

@m.krueger

Yes, you can compare two word files and highlight differences without MS Word in Docker Container using Aspose.Words REST API. Aspose.Words Cloud Docker Container supports all the features of Aspose.Words Cloud API. Please check the following sample code for reference. Please feel free to contact us for any assistance in this regard.

Sample Python Code to Compare DOCX Files for Differences

# For complete examples and data files, please go to https://github.com/aspose-words-cloud/aspose-words-cloud-python
import os
import asposewordscloud
import asposewordscloud.models.requests
from asposewordscloud.rest import ApiException
from shutil import copyfile

# Please get your Client ID and Secret from https://dashboard.aspose.cloud.
# In case of self hosting solution, set user and password parameter at the time of initializing docker container and user as Client ID and Secret respectively
client_id='xxxxxxxx'
client_secret='xxxxxxxxx'

# initiate Aspose.Words Cloud API
words_api = WordsApi(client_id, client_secret)
#words_api.api_client.configuration.host='https://api.aspose.cloud'
# Set base uri as per your Docker container
words_api.api_client.configuration.host='http://localhost:8080' 

# Compare two word documents
request_document = open('compareTestDoc1.doc', 'rb')
request_compare_data = asposewordscloud.CompareData(author='author', comparing_with_document='TestCompareDocument2.doc', date_time=dateutil.parser.isoparse('2015-10-26T00:00:00.0000000Z'))
request_comparing_document = open('compareTestDoc2.doc', 'rb')
compare_request = asposewordscloud.models.requests.CompareDocumentOnlineRequest(document=request_document, compare_data=request_compare_data, comparing_document=request_comparing_document, dest_file_name='CompareDocumentOut.doc')
result=words_api.compare_document_online(compare_request)
print(result)