Problem of font with insertHtml

Hi,


we’ve got a problem after changer to the new version of aspose.word (.net ).
With the old version , when we use the inserthtml , if there isn’t any special font in the html,
it will use the last font set.
for exemple:
pBuilder.setFont(“Times New Roman”, 5, …)
pBuilder.write(“Text”)
pBuilder.inserthtml(“Html”)

with the old version , the html use the last font (“Times New Roman”, 5, …) ,
but with the current version , it seems that html will use the font “Arial” , with a size pre-defined(10? 11?..).

we are using inserthtml everywhere, is there a way to do it like the old version ?

Hi,


we’ve got a problem after changer to the new version of aspose.word (.net ).
With the old version , when we use the inserthtml , if there isn’t any special font in the html,
it will use the last font set.
for exemple:
pBuilder.setFont(“Times New Roman”, 5, …)
pBuilder.write(“Text”)
pBuilder.inserthtml(“Html”)

with the old version , the html use the last font (“Times New Roman”, 5, …) ,
but with the current version , it seems that html will use the font “Arial” , with a size pre-defined(10? 11?..).

we are using inserthtml everywhere, is there a way to do it like the old version ?



Hello

Thanks for your request. Starting from the latest version behavior of InsertHtml was changed. Now content inserted by Insert HTML does not inherit formatting specified in DocumentBuilder options. Whole formatting is taken from HTML snippet. This is expected behavior.

If you insert HTML with no formatting specified, default formatting is used for inserted content.

Please let us know if you need more information, we will be glad to help you.

Best regards,