Will Aspose consider the font mentioned in HTML style?

Hello:

This is related to Aspose.Words for Java.

We are trying to insert below HTML into word document. But the font is not getting changed as mentioned.

<table width="600px" style="<b>font-family:helvetica;</b>">
<tr>
    <td width="500px"><strong>Sample Text</strong></td>
</tr>
</table>

Is it a bug or should I try different HTML tag to change the font?

Thanks,
Venkat

Hi

Thanks for your request. The problem occurs because, currently, Aspose.Words does not support inheriting styles from parent elements.

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.
In your case your HTML should look like the following:

<html>
<body>
    <table width="600px">
        <tr>
            <td width="500px">
                <span style="font-family: helvetica;"><strong>Sample Text</strong></span>
            </td>
        </tr>
    </table>
</body>
</html>

Best regards.

Thanks for the workaround solution. It works for us now. Looking forward to inheritance feature in HTML insert.

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.
(38)