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

Free Support Forum - aspose.cloud

Comparing two pdf files results in corrupt "comparisonResult.pdf"

I’ve been trying to compare two pdf’s and get the comparison result highlighting the differences but it appears to be not working since the comparison result file is damaged and not readable.

The code I used is almost the same as the one shown in the picture:
image.png (77.3 KB)

This code is from your (aspose) documentation and shows two pdf files being compared.
Could you help me resolve this issue or update the documentation?

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSCLOUD-2366

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

By default, the save format for document comparison is docx. So, if you want to save the output file as a PDF, you should specify the save format like this:
var compareDataOptions = new CompareData()
Author = "author",
ComparingWithDocument = fileName2,
ResultDocumentFormat = "pdf"

Alternatively, you can change the output file name to *.docx.
We appreciate your feedback and we will make sure to update our documentation to provide more accurate information.