Hi,
The attached presentation throws an exception whenever we open it.
There is a slightly different exception depending on the Aspose.Slides version.
Version 8.8
com.aspose.slides.PptxException: reading animation group failed.
at com.aspose.slides.TimeLineEx.do(Unknown Source)
at com.aspose.slides.SlideEx.do(Unknown Source)
at com.aspose.slides.SlideEx.(Unknown Source)
at com.aspose.slides.PresentationEx.do(Unknown Source)
at com.aspose.slides.PresentationEx.int(Unknown Source)
at com.aspose.slides.PresentationEx.if(Unknown Source)
at com.aspose.slides.PresentationEx.(Unknown Source)
at com.aspose.slides.PresentationEx.(Unknown Source)
at pptx.test.PowerPointBadFiles.main(PowerPointBadFiles.java:66)
Caused by: java.lang.NullPointerException
Version 14.6
java.lang.NullPointerException
at com.aspose.slides.ah.do(Unknown Source)
at com.aspose.slides.ayx.do(Unknown Source)
at com.aspose.slides.ayx.do(Unknown Source)
at com.aspose.slides.ast.do(Unknown Source)
at com.aspose.slides.arw.byte(Unknown Source)
at com.aspose.slides.arw.do(Unknown Source)
at com.aspose.slides.Presentation.for(Unknown Source)
at com.aspose.slides.Presentation.if(Unknown Source)
at com.aspose.slides.Presentation.(Unknown Source)
at com.aspose.slides.Presentation.(Unknown Source)
at com.aspose.slides.Presentation.(Unknown Source)
at pptx.test.PowerPointBadFiles.main(PowerPointBadFiles.java:66)
The code I’m using is as follows:
try {
String filename = “/Users/ianc/Desktop/untitled folder 2/pptx/8M_49pages.pptx”;
// Version 8.8 code
// PresentationEx presentation = new PresentationEx(filename);
// Version 14.6 code
Presentation presentation = new Presentation(filename);
String targetFile = filename + “.pdf”;
PdfOptions saveOptions = new PdfOptions();
presentation.save(targetFile, SaveFormat.Pdf, saveOptions);
} catch (Exception x) {
x.printStackTrace();
}
Thanks, Ian.