Hello Aspose,
I have requirement to display word content to ckeditor and send it to email.
So I have used “aspose word” library to convert word document to html file and I am using that html content in ckeditor. User can make changes in email content from ckeditor as per their require.
After that we are sending that content to as email to different recipients.
Now the issue is some of the bullet and special characters are not getting displayed on “mac” device. It’s displaying as square box. So I have found that converted bullet points are referring font-family “Symbol”. That font’s are not available on some mac and linux devices.
But it’s looking properly on my windows device. In my windows systems browser it looks properly in outlook.
So I need help how to convert word document to html email template so that can be use as universal html. which can be display properly on any email client like outlook, gmail and any device like windows, mac, linux.
I have attached following screenshots for reference.
Screenshot 1 (65.0 KB)
Screenshot 2 (32.7 KB)
Screenshot 3 (35.0 KB)
Screenshot 4 (13.1 KB)
I am adding following few fonts which are used for different symbols in converted html
Wingdings = for different symbols
‘Segoe UI Emoji’ = for emojis 


‘Courier New’ = for diamond symbol

OpenSymbol = used for round empty bullet ◦ ◦ ◦
FYI… I am using aspose word library in c#.
In your suggested link its showing to replace with unicode character. But In word document there may be multiple any kind of symbols may be available then, how I can identify and how can I replace any symbol with any unicode characters?
How I can check which unicode is used for which symbol? and there are multiple fonts being used in converted html.
Can you suggest any solution.
@DhavalKholiya Among the mentioned fonts only “Wingdings” is a symbolic font. “Segoe UI Emoji”, “Courier New” and “OpenSymbol” are Unicode font which should not have the described issue. Here you could check the PUA to Unicode mapping for standard Windows symbolic fonts. And you could accordingly replace the PUA characters from symbolic fonts with Unicode characters in Aspose.Words DOM.
Also we are considering to provide this functionality in our API. There is WORDSNET-23591 issue in our defect tracking system.
@Konstantin.Kornilov, Okay let try to convert from symbolic to Unicode. But in following example its changing font type. How can I convert specific font to Unicode? Can you provide any code sample for .NET c#? Do I need to write replace conditions for every symbols?
foreach (Aspose.Words.Lists.List lst in wordDocument.Lists)
{
foreach (Aspose.Words.Lists.ListLevel level in lst.ListLevels)
{
if (level.Font.Name == "Symbol" && level.NumberFormat == "\xF0B7")
{
level.Font.Name = "FreeSans";
level.NumberFormat = "\x2022";
}
}
}
@DhavalKholiya, you don’t need to convert the Symbol font. You just need to specify another font and replace the character with a similar look in this font. In the above code sample, the Symbol font is changed to the FreeSans font and the bullet character in Symbol font (0xF0B7) is replaced with the bullet character in the FreeSans font (0x2022).
FreeSans font is a Unicode font. You can use Arial, Times New Roman or Segoe UI Emoji instead, because all these 3 fonts have the bullet character (0x2022). You can easily check whether a font has this bullet character by using the Character Map program installed in Windows. The look of the bullet character may differ in different fonts. Here is an example of the 0x2022 bullet character in 3 different fonts:

@dshvydkiy, each users system having different fonts available. I have checked Symbol and FreeSans font is not available in one of my “mac” system.
In my windows all fonts are available. In linux system “Symbol” is not available but “FreeSans” is there.
Like that each user’s system having some fonts may be available and some may be not available. Fonts are by-default installed on each system. I can’t install or can not say to install different font’s on each user’s system.
If I replace fonts with specific font then it will look proper in some device and not looks proper in some device.
And also this is not only for specific bullet point. There are may symbols can be used as bullet. I have tried some samples and found. “Symbol” and “Wingdings” fonts is display as font-family in converted html. This is only 2 fonts for now which I have analyzed. It may be generate different “fonts” for different symbols.
Is there any universal way so each system can provide proper visualization for email.
@DhavalKholiya, since your emails are HTML, you probably should limit the set of fonts used in templates to the browser safe fonts: 1, 2, 3.
@dshvydkiy, I can not limit user to use any symbols and formatting. In my case different users are working on one document collaboration. Once word document is ready and final it’s getting converted to html using Aspose word library. After that I am using that html to send email to different users.
In that converted html I can see that font is being used. Which is converted from library.
@DhavalKholiya, another option is to embed fonts into the HTML page. The example below shows how this can be done:
Document doc = new Document("in.docx");
HtmlSaveOptions opts = new HtmlSaveOptions()
{
ExportFontResources = true,
ExportFontsAsBase64 = true,
CssStyleSheetType = CssStyleSheetType.Embedded,
PrettyFormat = true, // this is not required
};
doc.Save("out.html", opts);
In this case, all fonts used in input Word documents will be embeded into the output HTML pages. Naturally, the output HTML pages will have larger sizes.
Here are the links to our documentation pages for the HtmlSaveOptions properties:
I have already tried this but some how emails are striping off css part from html. I have tried email with embeded fonts but while I am checking emails with inspect element font and css part is not found there. Its getting removed by email client.
Embeded and external CSS doesn’t supported by email. We have to set it inline.
@DhavalKholiya, to sum up, the issue with the characters and fonts you are trying to solve is related to browsers, either stand-alone or embedded into email clients.
The possible solutions to that issue are:
- Embedding fonts into HTML pages
- Limiting the set of fonts used in Word document to browser safe fonts
- Replacing characters from non-Unicode fonts with Unicode characters and fonts
Trying to apply Aspose.Words to these solutions, we concluded that:
- Aspose.Words can do that, but email clients strip off the embedded fonts.
- This solution does not depend on Aspose.Words
- Aspose.Words can help with the replacements.
So while #1 seems not possible because you cannot control email clients, you can still try implementing #2 or #3 or some combination of them.