Free Support Forum - aspose.com

HTML Conversion - Issue with Track Changes

HTML Conversion - Issue with Track Changes

Use case

We have an OEM site license for Aspose Words.Net. We use it as a core part of a multi user document management solution to present an HTML view of the Word document as it undergoes editing by users of the system.

A key part of the solution is to visualize track changes information, so that users can see the in play edits without opening word.

The conversion works well, except that the red color for the altered text is lost during the conversion process.

Documents converted with Word Save As HTML correctly show the tracked changes in red.

The steps to reproduce are as follows

1. Open any existing Word document

2. Turn on Track Changes

3. Make a number of changes to the document

4. Save the document

5. Use Aspose Words.NET to convert the document to HTML

Result

1. Tracked changes are correctly processed and the strikethroughs are present on the altered content in the resulting HTML

2. The color attribute is lost from the tracked changes. They end up being black, as opposed to red in the converted HTML

Expected result

The tracked changes are Red in color

Hi Chuck,


Thanks for your inquiry. I have managed to reproduce the same issue at my side. We had already logged this issue as WORDSNET-4704 in our issue tracking system. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved. We apologize for your inconvenience.

Please use following code snippet as a workaround. Hope this helps you.

<span style=“font-size:
10.0pt;font-family:“Courier New”;color:#2B91AF;mso-no-proof:yes”>Document<span style=“font-size:10.0pt;font-family:“Courier New”;mso-no-proof:yes”> doc = new Document(MyDir

  • “in.docx”);<o:p></o:p>

foreach (Run run in doc.GetChildNodes(NodeType.Run, true))

{

if (run.IsDeleteRevision == true || run.IsInsertRevision == true)

run.Font.Color = Color.Red;

}

doc.Save(MyDir + "AsposeOut.html");