Problem convert html to Aspose Document with <ins> html tag


When converting html to Aspose document , if the html contains a <ins> tag inside , then converting the Document back to html, we can see a default color is applied (which is not dark by the way , but #b5082e) .
Even using the last version 24.1
Is there an option to fix that or is it a bug ?
Thank you
Here is a sample test to demonstrate :

final String html = """
			<span style="font-family: 'Arial Narrow',sans-serif; color: rgb(0,0,0);">

final com.aspose.words.Document document = new com.aspose.words.Document();
final DocumentBuilder builder = new DocumentBuilder(document);
builder.insertHtml(html, false);

final WordConverterAsposeLocal.NoBomByteArrayOutputStream bos = new WordConverterAsposeLocal.NoBomByteArrayOutputStream();, new HtmlSaveOptions(SaveFormat.HTML));
String after = bos.toUtf8String();
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<meta name="generator" content="Aspose.Words for Java 24.1.0" />
	<body style="font-family:'Times New Roman'; font-size:12pt">
			<p style="margin-top:0pt; margin-bottom:12pt">
				<ins style="color:#b5082e">
					<span style="font-family:Arial">example</span>
				<span style="font-family:Arial"> </span>
			<p style="margin-top:0pt; margin-bottom:0pt">
				<span style="-aw-import:ignore">&#xa0;</span>

@concord_tech This is not a bug, insert revision color is taken from RevisionOptions. So you change it using the following code:

Document doc = new Document("C:\\Temp\\in.html");

Please note, Aspose.Words is designed to work with MS Word documents. HTML documents and MS Word documents object models are quite different and it is not always possible to provide 100% fidelity after conversion one format to another. So the original HTML structure might be changed after processing it using Aspose.Words.

great, I just tested and it works, thank you :+1:

1 Like