Click here to Skip to main content
15,353,747 members
Please Sign up or sign in to vote.
0.00/5 (No votes)

I'm trying to make a document comparison viewer for web browser that feels as same as Microsoft word's 'Track Changes' and 'Compare' (options available in Review Tab).
I am already using Aspose.Words to convert every file type to docx and compare two files which gives me a redline copy merged into one single document. What i want to get is the resulting document(s) in a **side by side comparison** on UI. Also i want to give the ability to do the basic:
1. Get a summary of changes made and able to navigate as to where to changes are made in the document.(Scroll to the position of change in the document, just like Review Pane in MS word)
2. Accept and Reject those changes and download the revised document.
3. Able to compare text as well as non text related changes.

Where i could such 3rd party SDK that would help me achieve my objective or is there any was i could overcome the limitations i am getting from the tolls I've looked at ? The main concern is to have a navigation/mapping of change made to its position in the document and ability accept or reject those changes.

What I have tried:

I've looked for many 3rd party tools but always end up in a limitation surrounding them, to list a few

1. GroupDocs.Comparison - Gives navigation and auto scroll but in a
merged document not in side by side view. Also, does not gives a document but a set of images.
2. Draftable - Compares only text and style, no image/tagged file
objection insertion or deletion. No option to accept or reject
3. ipdf-net - No option to accept or reject changes.
4. PrizmDocs Document Compare API - No navigation to where the change is made in the document. Also no side by side comparison.
5. Litera Compare: No side by side comparison.
Updated 20-May-22 2:36am
Gerry Schmitz 20-May-22 11:52am
Side by side implies creating "2 instances" (i.e. windows / panels / user controls) of whatever you're doing now.
Member 15643424 20-May-22 12:31pm
Thanks Gerry for the response. Yes, i got that part. I can show deletions on left side and show insertions on right side. I've tested that using aspose and groupdocs. Although it won't work for litera ,it has its own ui and control buttons that i would put in iframe.
For aspose , i would could bring out the saved files for preview as pdf but not quite able to figure out how could i possibly map the list of changes (that i do get from aspose comparision) to their actual position in the document). My best guess here suggests i would need to i olement my own pdf viewer.

In case of groupdocs.comparison , which already provides positional mapping, this approach works vey well. But here's the thing, they make use of images which ruins the viewing experience if you have small font size or use a pdf for comparison. As an added details, the result i get is a document page as an image and a list of changes( each having an x,y coordinate and a bounding box size) which gets overlaid over the image(the doc page). This is how changes get highlighted.
Gerry Schmitz 21-May-22 12:54pm
.NET has "rich text boxes", "Flow documents", etc. that provide all the control you need. If you're going to invest in .NET, you should figure out how to import / export the different formats into your "universal comparison app". You've done the important stuff; figured out what was missing from the others. (I created my own "markup" for my UWP "book reader"). And there are API's to extract text from images in .NET.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900