We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

DocumentBuilder.insertHtml does nto honor inline styles

Following code :

DocumentBuilder builder = new DocumentBuilder(Session.get().getMainTemplate().getDoc());
Html being inserted looks like :

Describe the

mission of the system in this section

The INLINE -STYLE is not honored.
Please note that the destination document is a word template which has default styles.

Ajitha Gollapudi

Dear Ajitha,

Thank you for request.

Unfortunately, currently Aspose.Words does not support inheritance a style from parent node(s). This is known issue and I have linked your request to related record in our tracking system. We will keep you updated.

"Unfortunately, currently Aspose.Words does not support inheritance a style from parent node(s) "

The parent node has no styles. The html text that is being inherited has html code with the style tag. Will that not be honored?
Thank you for the prompt reply.



Thanks for your request. Svetlana is right, Aspose.Words does not support inheriting styles from parent elements in HTML.

In your particular case, formatting of text is specified on

element. But currently, Aspose.Words expects that font formatting is set in , , or element, formatting of paragraph – in


elements etc…

Your request has been linked to the appropriate issue, you will be notified as soon as it is resolved.

In your case your HTML should look like the following:



<p><i style="font-family: Arial; font-size: 10.0pt;">Describe the mission of the system in this section</i></p>



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.