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

Free Support Forum - aspose.com

FontDirExc property


in this post “Conversion produces different PDF on different platform” a new property has been introduced for the folder where Aspose.Cells searches for fonts.

Is there something similar for other components of Aspose.Total? In particular, I need a similar mechanism for Aspose.Words, but it would be useful to have it for other components as well.

Hi Mario,

Thanks for contacting support.

Aspose.Words for Java supports the feature to set custom font folder where fonts can be found/located during document creation/manipulation with Aspose.Words for Java. For further details, please visit How to Specify True Type Fonts Location.

Aspose.Pdf for Java also supports the feature to specify custom fonts directory where fonts will be located during PDF creation and manipulation. You can use following methods to get system folder of fonts or set font path to font folders. Hopefully it will help you to fix the issue.

Document.getLocalFontPath () // shows the system folder in which project will
look for fonts.

Document.setLocalFontPath (String) // Setting font path to custom folder

//adding a new font path

String path = "c:\\fonts\\";


The following code snippet to set font path if there are more than one font path.

//geting the list for standard font directories in different OS

java.util.List list = com.aspose.pdf.Document.getLocalFontPaths();

//seting the user list for standard font directories




//Restoring list for standard font directories by default.



sorry for answering only now, I was busy on other tasks.

Your suggestion seems to work satisfactorily.


Hi Mario,

We are glad to hear that your problem is resolved. Please continue using our API and in the event of any further query, please feel free to contact.