Hi,
I was wondering if there is any option to highlight the comparison result items such as in the following way:
image.png (2.8 KB)
Kind Regards,
Muhammad
Hi,
I was wondering if there is any option to highlight the comparison result items such as in the following way:
image.png (2.8 KB)
Kind Regards,
Muhammad
Thank you for you inquiry. We are investigating this scenario at our end. As we have any update on it, you shall be notified.
API only allows you to change items style for deleted, inserted or style changed elements in the resultant file. Using ComparisonSettings you can set/define style of modified elements. If element is not modified, it (style) will be same as in source and target documents. Highlighting the text is not supported by the API.
Code example to set style for modified elements/items:
ComparisonSettings cs = new ComparisonSettings();
//use this to set style of deleted elements
cs.DeletedItemsStyle.Color = Color.DarkRed;
cs.DeletedItemsStyle.Bold = true;
cs.DeletedItemsStyle.StrikeThrough = true;
cs.DeletedItemsStyle.Italic = true;
//use this to set style of inserted elements
cs.InsertedItemsStyle.Color = Color.Blue;
cs.InsertedItemsStyle.Bold = true;
cs.InsertedItemsStyle.StrikeThrough = true;
cs.InsertedItemsStyle.Italic = true;
//use this to set style of style changed elements
cs.StyleChangedItemsStyle.Color = Color.Green;
cs.StyleChangedItemsStyle.Bold = true;
cs.StyleChangedItemsStyle.StrikeThrough = true;
cs.StyleChangedItemsStyle.Italic = true;
You can also explore this documentation for further details.
Thank you for informing me. Example code is very helpful and it will be very nice feature if you guys add highlighting in future.
You are welcome.
We are further investigating this scenario. Can you please tell for what specific formats (DOCX, PDF etc) you want this feature?
You can now highlight comparison results using latest version of the API that is 18.8.0.
settings.InsertedItemsStyle.HighlightColor = System.Drawing.Color.Red;
settings.DeletedItemsStyle.HighlightColor = System.Drawing.Color.Blue;
settings.StyleChangedItemsStyle.HighlightColor = System.Drawing.Color.Green;
Please follow release notes in order to see further changes.