How to Avoid Wingdings and other Microsoft Fonts at Linux | DOCX to PDF Conversion using Java

Hello,
I have an issue with bullet lists generated from HTML and saved to PDF. I’m building this on a Linux server without Windows fonts. The resulting PDF has placeholder boxes for the third and fourth level bullets. In the logs I can see that it’s replacing Wingdings with one of my Linux fonts - which of course does not have the Wingdings character mapping.

I do not want to copy Windows fonts to Linux due to the licensing restrictions. Instead I would like Aspose to use a standard unicode character for lists, for example 0x2022. How can I do this?

The code to reproduce this can be found at: GitHub - tilmans/aspose_words_bullets_example

Thanks a lot,
Tilman

@tilman

Please note that Aspose.Words requires TrueType fonts when rendering document to fixed-page formats (JPEG, PNG, PDF or XPS). You need to install fonts that are used in your document on the machine where you are converting documents to PDF. Please refer to the following articles:
Using TrueType Fonts
Manipulating and Substitution TrueType Fonts

Hello @tahir.manzoor,
thank you for the fast response. This was actually not my question, I am aware that you need fonts that you can render and embed. My question is why an HTML with lists <li> uses the Windows-only Wingding font for the bullets. The HTML does not specify this so it must have something to do with the conversion process.

Best Regards,
Tilman

@tilman

Please note that Aspose.Words mimics the behavior of MS Word. If you convert your document to PDF using MS Word, you will notice that the bullets are exported with Wingding and Symbol fonts.

You may use TableSubstitutionRule.AddSubstitutes method to add substitute font names for given original font name. Hope this helps you.