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();
}
}