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

Free Support Forum - aspose.com

How to Convert PPT to PDF in java Aspose software

Hi,

How to Convert PPT to PDF in java Aspose software. Please provide the details.

Regards,

Dheeraj

Dear Dheeraj,

Aspose.Slides provides the feature of exporting PPT or PPTX presentations in to PDF format. Please proceed to this documentation link where you will find the code snippet to achieve the requirement. Please feel free to share, if you still face any problem.

Thanks and Regards,

Hi,

I'm getting the following exception when i try to conver the PPT to PDF. Downloaded the latest Aspose.slides jar file.(aspose.slides_2.3.0_20100710.jar). Using JDK1.5 .

Exception in thread "main" java.lang.NoClassDefFoundError: com/aspose/metafiles/MetafilesException
at com.aspose.slides.Slide.saveToAps(SourceFile:1513)
at com.aspose.slides.obfuscated.vu.do(SourceFile:55)
at com.aspose.slides.Presentation.save(SourceFile:3380)
at com.aspose.slides.Presentation.save(SourceFile:3328)
at PptFormat.main(PptFormat.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

Code:

Presentation pptPresentation = new Presentation("test.ppt");
pptPresentation.save("test.pdf", com.aspose.slides.export.SaveFormat.PDF);

Regards,

Dheeraj

Dear Dheeraj,

I have observed the stack trace. Actullay, your source presentation has metafiles contents inside it and when you export the presentation to PDF, you need to have Aspose.Meatfiles for Java for rendering of metafiles contents in your presentation. Pleaese download Aspose.Metafiles from this link and add the JAR file reference in your project. Hopefully the problem will be resolved.

Thanks and Regards,