Here’s a sample of the code i have used to save a slide to the SVG format.
Slides currentSlides = currentPresentation.getSlides();
System.out.println("Nombre de slides " + currentSlides.size());
if (currentSlides.size() != 0)
{
for (int i = 0 ; i < currentSlides.size() ; i++)
{
Slide tempSlide = currentPresentation.getSlideByPosition(i);
System.out.println(“Slide” + i + “
”);
tempSlide.saveToSVG(new FileOutputStream(new File(“c:\temp\Slide” + i + “.svg”)));
}
}
and I get a NullPointerException once I pass saveToSVG. Do you have a clue to this problem ?
I am using Tomcat 5.5.9/ JRE 1.5 and aspose.powerpoint 1.4.8.0
Thanks
Could you provide also your ppt file please?
In fact, the solution was very easy. The first slide has “position 1” not “0” … so that’s why on the first iteration, I had a NullPointerException.
Thanks.