Exporting track changes from HTML and underlined text

We are having issues with formatting text when exporting HTML content to Word with track changes turned on. We’ve added manually Aspose Word attribute for track changes in HTML () and track changes are displayed correctly in Word, but we don’t want inserted text to be shown with underline effect. We’ve tried to overcome this issue with RevisionOptions settings, but maybe we are doing something wrong. This is code snippet that we use for exporting HTML to Word (note that our HTML already has Aspose Word track changes style attribute) and you can find attached example in Word file.

com.aspose.words.LoadOptions loadOptions = new com.aspose.words.LoadOptions();
loadOptions.setLoadFormat(com.aspose.words.LoadFormat.HTML);
loadOptions.setEncoding(Charset.forName(“UTF-8”));
com.aspose.words.Document doc = new com.aspose.words.Document(input, loadOptions);
doc.setTrackRevisions(true);
RevisionOptions ro = doc.getLayoutOptions().getRevisionOptions();
ro.setInsertedTextEffect(RevisionTextEffect.NONE);
out = new ByteArrayOutputStream();
doc.save(out, com.aspose.words.SaveFormat.DOCX);

Hi Milan,

Thanks for your inquiry. You are saving Html to Docx. Please note that track changes information is MS Word (Application) level setting which is not stored in the document and therefore cannot be controlled by Aspose.Words. This is completely controlled by the viewer which opens the document. If you want to save document to fixed page format e.g Pdf, XPS, please use RevisionsOptions.

Please note that revision saved from aspose has turned underline ON, and when you do regular changes there is no underline. Can this underline feature be controlled (disabled)?
Thanks

Hi Milan,

Thanks for your inquiry. Could you please attach your input Html document here for testing? We will investigate the issue on our side and provide you more information.

Here is HTML original
Thanks

Hi Milan,

Thanks for sharing the Html. Unfortunately, we have not found the contents () in html. It would be great if you please share following detail for investigation purposes.

  • Please attach your input Word document.
  • Please attach the output Word file that shows the undesired behavior.
  • Please attach your target Word document showing the desired behavior. You can use Microsoft Word to create your target Word document. We will investigate how you are expecting your final document be generated like.

As soon as you get these pieces of information to us we'll start our investigation into your issue.

I am attaching input html and output docx file
Thanks

Hi Milan,

Thanks for sharing the detail. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-13034. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi. One question. This is Java plugin. Is it good to log it in NET section ? (WORDSNET-13034)

Hi Milan,

Thanks for your inquiry. The same issue will be fixed in Aspose.Words for .Net and Java.

Please note that the latest version of Aspose.Words for Java is completely auto-ported from .NET, i.e. we do not write code for Aspose.Words for Java; it is generated out automatically from C# code of Aspose.Words for .NET. So there should not be any significant difference in functionalities between Java and .NET versions because the code is mostly the same.

Please let us know if you have any more queries.

The issues you have found earlier (filed as WORDSNET-13034) have been fixed in this Aspose.Words for .NET 16.11.0 update and this Aspose.Words for Java 16.11.0 update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as WORDSNET-13034) have been fixed in this Aspose.Words for .NET 17.3.0 update and this Aspose.Words for Java 17.3.0 update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.