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

Free Support Forum - aspose.com

How to convert a PPTX file to PDF

Hi,

I need to convert a pptx file to pdf. Here is the code template :

PresentationEx pptPresentationEx = new PresentationEx("C:\\ziptest\\PPT\\pptx.pptx");

pptPresentationEx.save("C:\\AsposeTest\\aug\\ppt3.pdf", SaveFormat.PDF);

But its throwing the following exception :

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/media/jai/codec/ByteArraySeekableStream

at com.aspose.slides.obfuscated.tx$13.do(SourceFile:462)

at com.aspose.slides.obfuscated.adf.if(SourceFile:33)

at com.aspose.slides.obfuscated.adf.if(SourceFile:40)

at com.aspose.slides.obfuscated.adf.if(SourceFile:40)

at com.aspose.slides.obfuscated.adf.if(SourceFile:40)

at com.aspose.slides.obfuscated.adf.if(SourceFile:40)

at com.aspose.slides.obfuscated.adf.(SourceFile:17)

at com.aspose.slides.obfuscated.tx.if(SourceFile:265)

at com.aspose.slides.obfuscated.tx.(SourceFile:180)

at com.aspose.slides.pptx.PresentationEx.(SourceFile:1060)

at AsposeFileConverter.convertPPTFiles(AsposeFileConverter.java:108)

What could be the issue ? I am using Apose pdf 2.9.0 Version and Slides 2.4.0 version (Even I tried with 2.5.0 but its failing in this also).

Conversion of ppt to pdf is fine.

Presentation pptPresentation = new Presentation("C:\\AsposeTest\\aug\\Overview.ppt");

pptPresentation.save("C:\\AsposeTest\\aug\\ppt1.pdf", SaveFormat.PDF);

Hi Sriman,

The exception that you are encountering is due to missing jar file reference. Please visit this documentation link for dependent jar files that are used with Aspose.Slides for Java. Please share with us if there is still an issue.

Thanks and Regards,

Hi,

Could you please name all the needed jars to download? Batik contains a lot of jars and i am not able to figure out which are actually needed.

Please help.

Hi Sirman,

Please download the necessary jar files from https://apps.banckle.com/file/g/?v=nK9EX1RU6C1&f=Jar%20Files.rar.

Thanks and Regards,

Hey Mudassir,

Thanks a lot. It worked.