PDF File comparison throwing error -2

Hello Muhammad,

Good day. I appreciate your support.

Regarding the error I mentioned below mail please find the screen shot attached. I am attaching sample project which I downloaded from the link you provided earlier. I am able to create diff docs with the attached sample project since it shows error I am afraid it could be an issue when it deployed in production machine, please advise.

Regarding the thread https://forum.groupdocs.com/

I posted earlier the document we used for comparing not showing the actual result.

In the reply your are mentioned that we can able to track the formatting changes in new version of API. Sorry to say I can’t able to view those changes marked in output file. For your reference the same scenario included in the sample which is uploaded in google drive.

https://drive.google.com/........

Please let me know you need any clarification regarding this thread. Please help me to resolve this issue.

Thanks for giving the license clarification information our people will contact your team.

Thanks for your support. Awaiting for your reply.

Regards,

Nisanth Vijay (IN-TDC)

Hi Nisanth,

Thank you for the details.

We cannot download the sample project but we have rights to view, after looking into details and screenshot you shared we came to know that it is not GroupDocs.Comparison API issue, exception is generating at opening FileStream.

Please check the File and folder paths for input and output files, you can also place input files into root folder of your drive like “E:/Data/SourceFiles/source.docx” and “E:/Data/TargetFiles/target.docx”.

You have also mentioned to get changes from result file, that is available by using method “comparison.GetChanges()”

// Get changes from result file
GroupDocs.Comparison.Common.Changes.ChangeInfo[] changes = comparison.GetChanges();


We have also attached sample project (ComparisonWithGetChanges.zip) for you that demonstrate how to get changes and traverse each change set.

If you will need any help or you will have any other questions please feel free to ask.

Note: kindly use Support Forum instead of emails so we can help you in proper way and efficiently.

Warm Regards,

Hi Muhammad,

Good day thanks for your support.

Again i need your support because my another point still not resolved.

<!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val=“–”/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–>

<span style=“font-size: 11pt; font-family: “Calibri”,“sans-serif”;”>Regarding the thread https://forum.groupdocs.com/<span style=“font-size: 11pt; font-family: “Calibri”,“sans-serif”;”>

<span style=“font-size: 11pt; font-family: “Calibri”,“sans-serif”;”>I posted earlier the two PDF document we used for comparison and the result after comparison not showing
the actual changes we have made in the second the same i have tested with word files still i cant view the exact comparison result. I will explain my scenario once agin i have two word/pdf document the second revisied file I have highlighted some other paragraph in the same second document and try to compare first document and second document. The result file after comparison having this changes not marked as change. I have tried to upload the sample project but no luck. For your reference i have uploaded the same sample solution in google drive you can downloaded it from the below link.

<span style=“font-size: 11pt; font-family: “Calibri”,“sans-serif”;”>https://drive.google.com/file/d/0B12iT2UicqjDRGwwUVIydFdFUE0/view?usp=sharing

<span style=“font-size: 11pt; font-family: “Calibri”,“sans-serif”;”>I in the above example i have tested with two different word files the same you can use for reproducing the issue. please help me to sort this issue.

<span style=“font-size: 11pt; font-family: “Calibri”,“sans-serif”;”>If you need any other clarification regarding this please feel free to contact.

<span style=“font-size: 11pt; font-family: “Calibri”,“sans-serif”;”>Regards,

<span style=“font-size: 11pt; font-family: “Calibri”,“sans-serif”;”>Nisanth

Hello Nisanth,

Thank you for the details.

As per our understanding, you are expecting comparison results for highlighted paragraph will be shown as word “Changed” in result document.

GroupDocs.Comparison API does not display word “Changed” if there is any difference, it highlight the difference with Blue font color and for Style changes it highlight the changes in green color but all words/paragraph or everything stays same in the document.


In your sample project you have provided source and target files with highlighted paragraph with yellow background, which is not different so API does not show it as difference.

For comparison results you should change some text or words or styling for any word in target file then you will get result file with proper changes.

Please check the attached Source, Target and Results sample Docx documents generated using these document settings (data.zip).

// Get instance of GroupDocs.Comparison.Comparison and call method Compare.
GroupDocs.Comparison.Comparison comparison = Common.getComparison();

Stream result = comparison.Compare(sourceStream, targetStream, Path.Combine(Common.resultPath, Common.resultFile), ComparisonType.Words, new WordsComparisonSettings { StyleChangeDetection = true, MovedContentDetection = true });


Also consider that the evaluation version have limits please see details here.

If you will need any help or you will have any other questions please feel free to ask.

Warm Regards,