Free Support Forum - aspose.cloud

How to Compare 2 HTML files using Aspose.Words REST API

Hi Team,

I want to find difference between 2 html files (differences in its previews not source code). but it is giving me following error

Error: CompareDocument. Exception: Image file cannot be written to disk. When saving the document to a stream either ImagesFolder should be specified or custom streams should be provided via ImageSavingCallback. Please see documentation for details..

I am not able to find option for ImageSavingCallback in Compare API

@mukkubaba

Please share your input HTML documents and also confirm which document is the source document for comparison. We will investigate the issue and will share our findings with you accordingly.

Here are two html files : TestHtmls.zip (360.2 KB)

I am trying to compare revised.html file with original.html file.

It is possible if i convert both files to docx then compare both docx files and convert result file back to the html but It require 4-5 APIs for just one comparison (not an ideal solution).

Let me know if we can compare html files and get result in html in 1-2 API calls.

@mukkubaba

The Aspose.Words Cloud API supports HTML file comparison. However, I have noticed the reported issue with your shared HTML files and logged a ticket WORDSCLOUD-1547 for further investigation. We will notify you as soon as it is resolved.

Those html files are converted using Aspose words only so I hope this issue will resolve quickly. waiting for your response. Thanks you so much for your support.

@mukkubaba

Sure, we have recently noticed the issue and it is pending for investigation in the queue. We will share the details as soon as the investigation is completed.