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

Free Support Forum - groupdocs.com

Text only comparison in .docx and .pdf files

Hi Guys,

Is it possible to configure GroupDocs.Comparison to compare text of document only (potentially compare styles of document too).

I am using CompareDocs in similar way:

            string source = @"C:\temp\sample.docx";
            string target = @"C:\temp\sample_copy.docx";

            using (Comparer comparer = new(source))
                    new CompareOptions
                        DetalisationLevel = DetalisationLevel.High,
                        DetectStyleChanges = true,

                ChangeInfo[] changes = comparer.GetChanges();
                // check changes object

Could you please assist me in understanding if it is possible and how should I configure CompareOptions maybe? If I would like images to be ignored and only text of document compared (for .docx and .pdf).


Please take a look at the following documentation articles:

  1. Customize changes styles
  2. Get source and target text from files
  3. Get list of changes

Please take a look at the first point (shared earlier). You can compare files and set/customize style changes.
If you still need any assistance, we’d recommend you to share the source, target files and expected output.

1 Like