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

Free Support Forum - aspose.com

PPTX to PDF Save Error: java.lang.reflect.InvocationTargetException

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);
    
  • Previously, I am working with [java.version - 1.8.0_231]
    In [Java - 1.8], these PPTX to PDF conversion works as expected.

  • 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>
    

  • To check the performance in updated Java versions, I changed [java.version - 15]

  • Now, If I try to convert any PPTX file to PDF, the last line [pres.save()] throws the below error :

[ERROR MSG] Handler dispatch failed; nested exception is java.lang.InternalError: java.lang.reflect.InvocationTargetException
[ERROR CAUSE] java.lang.InternalError: java.lang.reflect.InvocationTargetException

Do I need to add any other configuration for later Java versions ?

Regards,
Raz

@dev.raz,
Thank you for contacting support.

I’ve tested PPTX to PDF conversion with Aspose.Slides 21.12 and Java 15, it works fine. It looks like your project has been configured incorrectly. Please check the project structure carefully. If the issue persists, please share a simple project that reproduces the error and a presentation file.

@Andrey_Potapov
Thank You for the immediate action.

Yes, in local Windows PC, it is working as expected.
We are using [openjdk - 15]

We are facing this issue only in server.

Operating System: Red Hat Enterprise Linux Server 7.9 (Maipo)
CPE OS Name: cpe:/o:redhat:enterprise_linux:7.9:GA:server
Kernel: Linux 3.10.0-1160.49.1.el7.x86_64
Architecture: x86-64

JAVA Version : 15 (openjdk)
JMX Version : 15+36-1562

@dev.raz,
Thank you for the additional information. Could you share a detailed stack trace for this exception, please?