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

Free Support Forum - aspose.com

How to set font directory path using Aspose.Slides (Java)

I have kept all the fonts in a directory named “dir” and given a path as “/sampleFolders/dir/” on linux server

String[] fontDir = new String[] {PropertyHolder.getFontsDirectories()};
System.out.println(“fontDir”+ fontDir);
// Load the custom font directory fonts
FontsLoader.loadExternalFonts(fontDir);
Presentation ppt = new Presentation(is);
ppt.save(fos, com.aspose.slides.SaveFormat.Pdf);

but this is accepting only one font named arialBold but all the other supported fonts are kept in this directory so can we use something which will get all the fonts from the “dir” directory.

@gauravbhandari,

I have observed your requirements and like to share that you have done right by setting path to fonts directory. If other fonts that are placed in your directory and are also referred in your presentation, the will also get loaded for presentation as well. If there is any issue in this regard, please feel free to share the source presentation, used fonts and generated PDF with us. Please also first try using latest Aspose.Slides for Java 19.3 on your end as well.