Error Saving PPTX to PDF in Java: class com.aspose.slides.PptxReadException

Hi,

I am using Aspose.total with Developer OEM license.

  • With Aspose slides, I am trying to convert a PPTX file to PDF as follows :

com.aspose.slides.LoadOptions loadOptions = new com.aspose.slides.LoadOptions();
Presentation pres = new Presentation(GZIPInputStreamObject, loadOptions);
pres.save(fileOutputStream, com.aspose.slides.SaveFormat.Pdf);

  • I am using the latest version of Aspose slides [21.12 ]
  <dependency>
 	<groupId>com.aspose</groupId>
 	<artifactId>aspose-slides</artifactId>
 	<version>21.12</version>
 	<classifier>jdk16</classifier>
  </dependency>

Preview_Error_Report_PPTX_File.7z (43.5 KB)
When I try to convert the above PPTX file to PDF, the below error throws :

stackTrace :
class com.aspose.slides.PptxReadException —> java.lang.NullPointerException
— End of inner exception stack trace —
com.aspose.slides.aji.do(Unknown Source)
com.aspose.slides.Presentation.if(Unknown Source)
com.aspose.slides.Presentation.do(Unknown Source)
com.aspose.slides.Presentation.if(Unknown Source)
com.aspose.slides.Presentation.(Unknown Source)
com.aspose.slides.Presentation.(Unknown Source)
com.wsf.service.DownloadServiceImpl.savePresentationGroup(DownloadServiceImpl.java:624)
com.wsf.service.DownloadServiceImpl.generateTempPdf(DownloadServiceImpl.java:558)
com.wsf.service.DownloadServiceImpl.getPreviewFileObject(DownloadServiceImpl.java:495)
com.wsf.controller.WsfFileDownloadController.getPreviewFileObject(WsfFileDownloadController.java:108)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197)
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141)
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:894)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1060)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
javax.servlet.http.HttpServlet.service(HttpServlet.java:681)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382)
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1726)
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:748)


Caused by : java.lang.NullPointerException
at com.aspose.slides.fq.do(Unknown Source)
at com.aspose.slides.fs.do(Unknown Source)
at com.aspose.slides.fs.do(Unknown Source)
at com.aspose.slides.f3.do(Unknown Source)
at com.aspose.slides.s0.do(Unknown Source)
at com.aspose.slides.s0.do(Unknown Source)
at com.aspose.slides.bt.do(Unknown Source)
at com.aspose.slides.ao9.do(Unknown Source)
at com.aspose.slides.aj1.do(Unknown Source)
at com.aspose.slides.aji.byte(Unknown Source)

The size of this PPTX file is 270 KB (only 4 slides)
Could you check from your side once and let us know is there any issue in this selected file formatting ?

@dev.raz,
Thank you for reporting the issue.
I’ve reproduced the problem with the presentation loading and added a ticket with ID SLIDESJAVA-38719 in our issue tracking system. We apologize for any inconvenience. Our development team will investigate this case. You will be notified when the issue is resolved.

HI, Kindly let us know when this issue will be solved and also when we will get next notification

@dev.raz,
I requested plans for this issue from our development team. We will let you know as soon as possible.

@Andrey_Potapov
The below PPTX file conversion to PDF also throws this same error.
[class com.aspose.slides.PptxReadException]
Preview_Error_Report_PPTX_File_2.7z (631.1 KB)

Kindly check this PPTX file conversion also.

@dev.raz,
Thank you for another presentation example. I’ve reproduced the same exception and sent the file to our development team.

@Andrey_Potapov
May I know the current status of this issue ?

@dev.raz,
As far as I can see, an investigation of the issue has been scheduled for this week. Unfortunately, I don’t have any further progress information yet. We will let you know as soon as something changes.

@Andrey_Potapov
Could you share the current status related to this issue?

@dev.raz,
I’ve requested ETA from our development team for this issue. I will let you know shortly.

@dev.raz,
Our developers have promised to resolve the issue this week. I will be able to tell you only next week which version of Aspose.Slides a fix will go into.

@Andrey_Potapov
Could you share the update for the fix release related to this issue?

@dev.raz,
Our development team reported that some reasons for the exception have already fixed but some other problems were found. We are still working on the issue.

@dev.raz,
Our developers are still working on the issue. At the moment, there is a problem with 4th chart on 17th slide of the Preview_Error_Report_PPTX_File_2.pptx. Could you please clarify, how the chart was created?

@Andrey_Potapov

Sorry for the late reply.

Could you please clarify, how the chart was created?

This document is created using some external application by client side.
Could you share the status of this issue?

@dev.raz,
I requested an ETA again from our development team to resolve the issue. I will let you know as soon as possible.

@dev.raz,
Our development team is still working on the issue. Unfortunately I don’t have more information for you. We are doing our best to resolve the issue.

@Andrey_Potapov

Could you share the status of this issue we need to inform client?

@dev.raz,
Our development team is still working on the problem. Not all issues found have been resolved yet. We need more time to solve them.

@Andrey_Potapov
Thank you for the continuous support and reply.
Could you share the progress of this issue because we need to inform client?