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

Free Support Forum - aspose.com

How to apply Css styles from an seperate css file?

Hi Team,

We are generating a word document using the Aspose.Words. We are using a seperate css file to set our styles in our document, especially for header and footer. Currently its not working as expected. How do we set this css for the output word document ?

regards,
Anish

@anishv3,

Aspose.Words will automatically fetch and apply the styles from external CSS. However, the HTML file should contain the following tag:

<head>
    <link rel="stylesheet" type="text/css" href="mystyle.css">
</head>