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

Free Support Forum - aspose.com

Getting fonts issue in PPT(x) to PDF export

Hi,


I am trying to export ppt(x) to pdf using following code with attached file and getting
Exception in thread “main” java.lang.AssertionError: Cannot read a name from the name table in a font.

public static void convertPPTToPdf(String filePath){
try {
Presentation pptPresentation = new Presentation(filePath);
String newFileName=filePath+File.separator+“test_”+System.currentTimeMillis()+".pdf";
pptPresentation.save(newFileName,SaveFormat.Pdf);
System.out.println(“File Converted to Path: “+newFileName);

} catch (Exception e) {
e.printStackTrace();
}
}

public static void convertPPTXToPdf(String filePath){
try {
PresentationEx pptPresentationX = new PresentationEx(filePath);
String newFileName=filePath+”_”+System.currentTimeMillis()+".pdf";
pptPresentationX.save(newFileName,SaveFormat.Pdf);
System.out.println("File Converted to Path: "+newFileName);

} catch (Exception e) {
e.printStackTrace();
}
}

HI Muhammad Azeem,


I have worked with the presentation file shared by you using Aspose.Slides for .NET 6.9.1 and have not been able to observe the issue specified. For your kind reference, I have attached the generated PDF as well.

Many Thanks,