Use Aspose.Words compare PDF (c#)

I use Aspose.Words to compare PDF,but I can’t get different mark in result PDF.
I get result PDF like test.pdf but this file formmat is cleared
This is my code

            string d1 = @"test.pdf";
            string d2 = @"test2.pdf";
            string comparisonDocument= @"AsposeComparePdf_" + DateTime.Now.ToString("HH_mm_ss") + ".pdf";

            Aspose.Words.Document doc1 = new Aspose.Words.Document(d1);
            Aspose.Words.Document doc2 = new Aspose.Words.Document(d2);

            Aspose.Words.Comparing.CompareOptions compareOptions = new Aspose.Words.Comparing.CompareOptions();
            compareOptions.Target = ComparisonTargetType.New;

            doc1.Compare(doc2, "a", DateTime.Now, compareOptions);


Looking forward to your response


Could you please ZIP and attach your input PDF files along with problematic and expected output documents? We will investigate the issue and provide you more information on it. (139.4 KB)
Hi Tahir,
Thank you for your reply,
I attach file,thank you

The RevisionOptions class allows to control how document revisions are handled during layout process. Please use following code snippet to get the desired output.

doc1.LayoutOptions.RevisionOptions.ShowRevisionBars = true;
doc1.LayoutOptions.RevisionOptions.ShowRevisionMarks = true;
doc1.Save(MyDir + "21.8.Pdf");
1 Like

Hi Tahir,
Thank you for your answer,
I use you provide code ,then it success, Thank you,
I have other questions,
In PDF characters use “標楷體”,but compare result file will format this type of characters ,and in table row 21 can’t read full context. (234.1 KB)

Please reference attached of,Thank you.


We have tested the scenario and managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-22675. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

1 Like

Hi Tahir,
Thanks ! I really appreciate it.
Looking forward to your good news.


During analysis we have found that the document is displayed differently depending on MS Word version? Could you please share which MS Word version you are using? Please also share how you generated the Expected2.pdf. This will help us to under the expected result.