I convert docx to html format (using apache poi) and send it as email.
A snippet of the generated html looks something like this:
<html>
<head>
....
<style>
span.Normal{
font-family: 'Arial';font-size: 9.0pt;
}
span.Title{
font-family: 'Cambria';font-size: 28.0pt;color: #000000;
}
span.MySubtitle{
font-family: 'Arial';font-size: 18.0pt;color: #000000;
}
span.MyTitle{
font-family: 'Arial';font-size: 22.0pt;font-weight: bold;color: #000000;
}
...
</style>
</head>
<body>
....
<p class="Normal Title MyTitle">
<span id="_GoBack">
<span class="Normal Title MyTitle">Welcome Message</span>
<span class="Normal Title MyTitle"> </span>
<span class="Normal Title MyTitle">Username</span>
</p>
<p class="Normal Title MySubtitle">
<span class="Normal Title MySubtitle">Issues and Solutions</span>
</p>
...
</body>
</html>
Run codeHide resultSeveral CSS classes are not recognized by the Outlook client. This is just rendering the first class css "Normal" and ignoring the rest. But my original formatting (in docx) is present in the classes "MyTitle" and "MySubTitle".
Does Outlook support multiple css? Is there a way that I can manage several generations of css.
Fayaz source
share