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

Free Support Forum - aspose.com

PDF conversion broken. Nullpointer when converting any PPTX to PDF


when I try to convert a PPTX to PDF using the following code I get a Nullpointer Exception.

PresentationEx presentation = new PresentationEx(pptxBytes);
ByteArrayOutputStream pdfBytes = new ByteArrayOutputStream();
PdfOptions opt = new PdfOptions();

//Define behavior for metafiles
//Set Text Compression level

//Define the PDF standard
// here we would have the possibility to specify PDF options…
presentation.save(pdfBytes, SaveFormat.PDF, opt);

The stacktrace is:

java.lang.NullPointerException at com.aspose.slides.obfuscated.egv.if(SourceFile:1025) at com.aspose.slides.obfuscated.egv.do(SourceFile:999) at com.aspose.slides.obfuscated.egv.if(SourceFile:218) at com.aspose.slides.pptx.PresentationEx.do(Unknown Source) at com.aspose.slides.pptx.PresentationEx.(Unknown Source) at com.aspose.slides.pptx.PresentationEx.(Unknown Source)

I’m using Aspose.Slides version 2.9.1. This is a real project blocker for us, as we are not able to produce PDF anymore…

Thank you for fast help


Hi Marco,

I have observed the stack trace shared by you. Please share the source presentation with us for further investigation on our end.

Many Thanks,

hi Mudassir,

Thank you for the fast response. Actually this was my error. The inputstream was null. Sorry for the inconvenience.

You can close this thread.