DocumentBuilder.InsertHtml does not seem to be be rendering inline Style information from html into Doc

I was trying to build a document using DocumentBuilder.InsertHtml, the html which i am passing to this method has some inline styles like bold font, align center etc, however i noticed that when Aspose Words renders this information into the Documents, the style information is not being used. Could you confirm the same, whether this expected, if so whether there are any workaround for that

This message was posted using Aspose.Live 2 Forum


Thanks for your request. Could you please share your HTML and sample code here? I will check it and provide you more information.
Best regards.

The Code is as simple as

*var oDoc = new Document();
var builder = new DocumentBuilder(oDoc);

oDoc.Save(localStream, SaveFormat.Doc);*

localStream is where i save the doc content,

example html content is below:

Title: New Title

That was just an example of the usage of styles, i also noticed that it did not respect center tag.

The word meeting does not appear in bold nor is centered to the document. One other thing which i noticed is that if html table contains border=0, borders still appear in the Document.



Thanks for your request. The problem occurs because formatting is specified in
Currently, Aspose.Words expects that font formatting is set in <span>, <i>, <b> or <u> element, formatting of paragraph – in <p> or <h1><h6> elements etc…
I linked your request to the appropriate issue, you will be notified as soon as it is resolved.
Best regards.

Any idea when that might be resolved, i would like to take some decisions based on that. Also anything on the table issue i mentioned.
I tested the scenario i gave you, by changing the div to span, i noticed that Bold took effect but text-align:center did not take affect.



Thanks for your request. Align does not work because this is not option of text, but an option of Paragraphs. Your HTML should look like the following:

This is bold centered text!

Regarding table borders, maybe you just should disable "Show Gridlines" option in MS Word. If this option is enabled, MS Word shows invisible borders as blue dotted lines (or gray solid lines in MS Word 2003 and older). Best regards.

The issues you have found earlier (filed as WORDSNET-2021) have been fixed in this .NET update and this Java update.

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

A post was split to a new topic: The alignment(align = “justify”), font size , font text etc. are not working after the dll upgrade