Compare two document

good day,
I am comparing two documents and I get an error when comparing. Could you take a look at it for me?

Error:
“An object of type Aspose.Words.Tables.Table cannot be cast to type Aspose.Words.Paragraph.”}

thank you in advance
T.

@benestom Could you please attach the problematic documents here for testing? We will check the issue and provide you more information.

Document docXA = new Document(pathX + "DocA.docx");
Document docXB = new Document(pathX + "DocB.docx");
docXA.Compare(docXB, "author", DateTime.Now);

DocA.docx (30.5 KB)
docB.docx (33.5 KB)

@benestom Thank you for additional information. I cannot reproduce the problem with the latest 22.11 version of Aspose.Words. Please try using the latest version.

it’s fine with this version

thank you

1 Like

A post was split to a new topic: An error occurs when comparing two documents

good day,
I came across a document that reports an error when comparing:
An object of type Aspose.Words.SpecialChar cannot be cast to type Aspose.Words.Run.

prime0TSP423.Compare(New0TSP423, “Test”, DateTime.Now, compareOptions);

New0TSP423.docx (7.0 MB)
prime0TSP423.docx (7.0 MB)

@benestom
Thank you for reporting this issue. 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): WORDSNET-25756

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.

The issues you have found earlier (filed as WORDSNET-25756) have been fixed in this Aspose.Words for .NET 23.9 update also available on NuGet.

Hello, I came across documents where aspos changes the absolute values in the table when comparing. You can look at it?

CompareOptions compareOptions = new CompareOptions();
compareOptions.IgnoreFormatting = false;
compareOptions.IgnoreCaseChanges = false;
compareOptions.IgnoreComments = false;
compareOptions.IgnoreTables = false;
compareOptions.IgnoreFields = false;
compareOptions.IgnoreFootnotes = false;
compareOptions.IgnoreTextboxes = false;
compareOptions.IgnoreHeadersAndFooters = true;
compareOptions.Target = ComparisonTargetType.New;
dB.Compare(dA, "test", DateTime.Now, compareOptions);

dB.docx (43.4 KB)
dA.docx (713.9 KB)

@benestom
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): WORDSNET-25974

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.

Thanks for the identification.
I would like to know how it came about so that I can correct the document. To keep the table from breaking…

@benestom At the moment it is difficult to say what caused the problem. Our development team will investigate the issue deeper and either provide a fix or provide additional information regarding the issue.

good day,
When comparing the two documents with the latest version of aspose, I came across a big difference. Aspose didn’t identify the change in the link title for me!

prime.Compare(new, "CezGenerator", DateTime.Now, compareOptions);

prime.docx (176.2 KB)

new.docx (139.4 KB)

you can look at it. Thank you in advance

Version aspose 23.09 is OK

@benestom
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): WORDSNET-26142

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.

Issue ID(s): WORDSNET-25756, good day, how does it look with the solution, is it closed or when is the new version?

@benestom The issues WORDSNET-25756 have been fixed in Aspose.Words for .NET 23.9 update.

it’s fine with this version.
.

1 Like

Supr, I’m a bit confused about this, and the other issues in this thread?
WORDSNET-26142
WORDSNET-25974

@benestom WORDSNET-26142 is already resolved in the current codebase, the fix will be included into the next 23.12 version of Aspose.Words.

Unfortunately, WORDSNET-25974 is not resolved yet.