Getting error while converting PPT / PPTX to PDF

com.aspose.slides.PptException: com.aspose.slides.obfuscated.bri: java.lang.NullPointerException
at com.aspose.slides.obfuscated.css.do(Unknown Source)
at com.aspose.slides.pptx.PresentationEx.save(Unknown Source)
at com.aspose.slides.pptx.PresentationEx.save(Unknown Source)
at com.pdfconverter.aspose.AsposePdfConverter.convertPptXToPdf(AsposePdfConverter.java:211)
at com.pdfconverter.aspose.AsposePdfConverter.convertToPdfUtil(AsposePdfConverter.java:58)
at org.apache.jsp.jsp.pdfconversion_jsp._jspService(pdfconversion_jsp.java:155)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:679)
Caused by: com.aspose.slides.obfuscated.bri: java.lang.NullPointerException
at com.aspose.slides.obfuscated.bot.(Unknown Source)
at com.aspose.slides.obfuscated.bqj.(Unknown Source)
at com.aspose.slides.obfuscated.bot.do(Unknown Source)
at com.aspose.slides.obfuscated.bpy.do(Unknown Source)
at com.aspose.slides.obfuscated.bqf.do(Unknown Source)
at com.aspose.slides.obfuscated.bpn.do(Unknown Source)
at com.aspose.slides.obfuscated.bpw.do(Unknown Source)
at com.aspose.slides.obfuscated.bmj.do(Unknown Source)
at com.aspose.slides.obfuscated.bmf.do(Unknown Source)
at com.aspose.slides.obfuscated.blw.do(Unknown Source)
at com.aspose.slides.obfuscated.bmf.do(Unknown Source)
at com.aspose.slides.obfuscated.bmu.do(Unknown Source)
at com.aspose.slides.obfuscated.bpw.do(Unknown Source)
... 24 more
Caused by: java.lang.NullPointerException
at com.aspose.slides.obfuscated.brv.this(Unknown Source)
at com.aspose.slides.obfuscated.brv.for(Unknown Source)
at com.aspose.slides.obfuscated.brv.do(Unknown Source)
at com.aspose.slides.obfuscated.brv.if(Unknown Source)

Hi,


Since your query is related to Aspose.Slides for Java, so I am moving your thread to Aspose.Slides forum where one of our Aspose.Slides team member will help you soon.

Thank you.

Hi Anurag,


Thanks for inquiring Aspose.Slides.

I have observed the stack trance shared by you. Can you please try using latest avialble version of Aspose.Slides for Java 2.9.5 for your investigation. If the issue still persist then kindly share the sample presentation along with code snippet used for investigation on my end. I will be really glad to help you out further.

Many Thanks,

Hi,


I am using latest version of Aspose Slide : aspose-slides-2.9.5-java


Code snippet :

inputFile : is the ppt file location
outputFile : is the location + filename to save output pdf file

Presentation presentation = new Presentation(inputFile);
presentation.save(outputFile, SaveFormat.PDF);

I have attached ISIR.ppt as a sample ppt file.

Hi Anurag,


Thanks for sharing the source presentation. I have worked with the presentation file shared by you and have not been able to observe the issue specified. I have used Aspose.Slides for Java 2.9.5 in Windows 7 x64 environment. For your kind reference, I have shared the generated presentation as well. Can you please share in which environment you are using Aspose.Slides along with platform information.

Many Thanks,

Hi ,

Below is the platform details I am using ;

Platform:

java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.3) (6b24-1.11.3-1ubuntu0.12.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

Hi Anurag,


I have tested the presentation shared by you in Linux environment installed with Open JDK on my end. I have not been able to observe any issue again. The following are the platform details on my end.

Environment: x86 Ubuntu 10.04.1 LTS installed on VmWare
Open JDK java version :1.6.0_20

I have shared the generated PDF for your kind reference. Can you please share that you are adding reference to JAI jar files for your sample project. Please also try to export a simple one slide presentation to PDF on your end to see if things work on your end at all or not.

Many Thanks,

hi,


I am using below mentioned JAI jar

jai_codec-1.1.3-alpha.jar
jai-core-1.1.3-alpha.jar

Hi Anurag,


As requested earlier, can you please also try to export a simple one blank slide presentation to PDF on your end to see if things work on your end at all or not.

Many Thanks,

While trying blank ppt and pptx file … I am still getting same error.

Hi Anurag,


I have updated my Open JDK version to 6b24-1.11.3-1ubuntu0.10.04.1 and have been able to generate the PDF properly. As you have mentioned that even a simplest empty presentation is not being rendered to PDF on your end, it seems there is some issue on your end and I would suggest you to please try re-installing the JDK on your end. Also install the JDK update for running in headless mode.

For your kind reference, I have shared the sample Eclipse project along with used Jar Files. You can observe the sample project and use it Jar files shared on your end.

Many Thanks,