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

Free Support Forum - aspose.com

Can't create PDF

Dear all,

I cannot create any pdf with the save() Function in PresentationEx.
I’m getting always a

com.aspose.slides.obfuscated.bri: java.lang.NullPointerException

I’m using the latest trial version with java 1.6.

My simplified example :
PresentationEx pres = new PresentationEx();
SlideEx sld = pres.getSlides().get(0);
sld.getShapes().addAutoShape(ShapeTypeEx.RECTANGLE, 50, 150, 75, 150);
pres.save( new FileOutputStream (“c:\data\pwmblor\demo.pdf”) , SaveFormat.PDF);

If I try just
PresentationEx pres = new PresentationEx();
pres.save( new FileOutputStream (“c:\data\pwmblor\demo.pdf”) , SaveFormat.PDF);
I’m getting the same Error

Thanks for your help or advice.

Thomas



Hi Thomas,


I have worked with the code snippet shared by you using Aspose.Slides for Java 2.8.1 and it works fine on my end. Please try using the mentioned version of Aspose.Slides for Java.

Many Thanks,

Sorry, I think it was my mistake ( library mismatch ). I set up a new project and than it was running perfectly.