Free Support Forum -

Pdf Conversion using Aspose.Words v10.0.1


I just tried saving a word document as pdf on a debian edge linux machine.

I caught the following error:

Cannot find any fonts installed on the system. (IllegalStateException)

There are several .ttf-fonts in /usr/share/fonts.
Where does Aspose.Words look for fonts on linux boxes?

Best regards,



Thanks for your request. If you run Aspose.Words on a Windows system, then by default it will search for fonts in the system Windows\Fonts folder. But if you run Aspose.Words on a Linux system, it does not have a default location for fonts and you need to specify it explicitly.

Use the new com.aspose.words.FontSettings class and setFontsFolder/setFontsFolders methods to specify the location of TrueType fonts.


DocumentBuilder b = new DocumentBuilder();

b.getFont().setName("Water on the Oil");


b.writeln("Hello World!");

b.getDocument().save("TestHelloWorld Out.pdf");

Best regards,