Convert ppt and pptx into png with aspose slides in java

Hi sir,


I have alist of ppt and pptx files in one folder and i want to convert all ppt and pptx files into png images
let us assume that we have ppt consists of 10 slides it will convert 10png images like that
10 ppt and 10pptx files ===100png images like that … Can you share working code …

Thanks in advance

Hi Naidu,

Please see the following documentation links with details and sample code regarding converting presentation slides to images using Aspose.Slides for Java.

Please feel free to contact support in case you need any further assistance.

Thanks & Regards,

Dear sir,


I am sending files please let me know!
1) Any jar files are required?
I am using aspose slides 8.0 jar
i got an exception
Exception in thread “main” java.lang.NoClassDefFoundError: com/sun/media/jai/codec/ByteArraySeekableStream
at com.aspose.slides.PPImage.do(Unknown Source)
at com.aspose.slides.PPImage.getRenderedImage(Unknown Source)
at com.aspose.slides.PictureFrame.do(Unknown Source)
at com.aspose.slides.Slide.getThumbnail(Unknown Source)
at com.aspose.slides.Slide.getThumbnail(Unknown Source)
at convertingimages.Convertingimages.main(Convertingimages.java:34)
Caused by: java.lang.ClassNotFoundException: com.sun.media.jai.codec.ByteArraySeekableStream
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
… 6 more
Java Result: 1


Hi Naidu,

I have checked your shared code with a sample PPT file at my end using Aspose.Slides for Java 8.1.0 and I am unable to reproduce the issue. Please share your template presentation file with us. Also, please share the environment details like OS, JDK version etc. with us to further check the issue at our end.

Thanks & Regards,

Hi,


Environment details:::::::::::::::::::::::::

Netbeans 7.0.1
jdk1.6.0_26
jre6
Windows 7 64 bit
Apache Tomcat 7.0.14
list of ppt or pptx in one local folder let us say D:/ppts
from that i have to convert each ppt as a png image on each and every ppt and slides too

Hi Naidu,

As requested in my previous post, please share your sample PPT /PPTX files with us to further check the issue as we are not able to reproduce the issue at our end.

Thanks & Regards,

Hi,


Please find the above ppts and pptx files and let me know !

I have 50 ppts and pptx files in one folder named as merge i want to convert all
ppt and pptx files into png files
1) 1 ppt 10 slides =10 png images like that pptx also …








Hi Naidu,

Thank you for sharing the files.

I again tested your issue and I am not able to reproduce the issue you mentioned using Aspose.Slides for Java 8.1.0 with JDK 1.6.0.26. However, during my testing, I found out an issue with “DoubleBigPPT.pptx” (Rest of the files are converting fine). The file “DoubleBigPPT.pptx” hangs and doesn’t generate any output PNG file. I have registered this issue in our issue tracking system with issue id: SLIDESJAVA-34204. We will notify you once the issue gets resolved.

To reproduce your issue, I would suggest you to share the exact code you are using. It might help us identifying the cause of the issue at your end.

Thanks & Regards,

Hi,


Please share the project in zip what ever you are tested !!


Thanks

Hi Naidu,

I am using the same code as shared above in the documentation links. I have attached the java file for your reference which you may test at your end and see if it works fine or you still get the same issue. I am using “Chapter16.pptx” file in this sample.

In case you need any further assistance, please do let us know.

Thanks & Regards,

Hi sir,


I am getting this exception after code is running !
Exception in thread “main” java.lang.SecurityException: class “com.aspose.slides.PresentationEx”'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:806)
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:487)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:625)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
Java Result: 1


Thanks in advance

Hi sir,


I got the output but i am giving static one here like
Presentation ps=new Presentation(“D:/Presentation.ppt”);
but i want to do dynamic one folder example D:/data/list of ppts how can i pass this dynamically into the presentation parameters…

Hi Naidu,

Thank you for the feedback.

From your response, it seems that there is no issue with Aspose.Slides and you are able to process the files fine. Regarding your requirement of getting multiple files from a directory and process them, it depends on your implementation that how you achieve it. However, I have updated the java class which gets all the files from a directory and process them one by one using Aspose.Slides. Please see the attached file for the sample code.

In case you need any further assistance, please feel free to contact support.

Thanks & Regards,

The issues you have found earlier (filed as SLIDESJAVA-34204) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.