Free Support Forum - aspose.com

Cannot transform ppt & pptx to pdf

I am trying to convert an existing ppt or pptx file to PDF format and I get the following error when I try
to do
String path = file.getAbsolutePath();
Presentation ppt = new Presentation(path);

I am using as library the aspose.slides-16.11.0.jar file.

12-08 17:55:12.743 26036-29876/com.xxx.android E/AndroidRuntime: FATAL EXCEPTION: RxIoScheduler-2
Process: com.xxx.android, PID: 26036
java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.Worker thread.
at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:59)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Ljava/awt/GraphicsEnvironment;
at com.aspose.slides.ms.core.System.Drawing.a.for(Unknown Source)
at com.aspose.slides.ms.pbdb106a0.p6a2feef8.al.(Unknown Source)
at com.aspose.slides.ms.pbdb106a0.p6a2feef8.f.const(Unknown Source)
at com.aspose.slides.kz.(Unknown Source)
at com.aspose.slides.ColorFormat.(Unknown Source)
at com.aspose.slides.zc.(Unknown Source)
at com.aspose.slides.zc.(Unknown Source)
at com.aspose.slides.FillFormat.setFillType(Unknown Source)
at com.aspose.slides.Presentation.final(Unknown Source)
at com.aspose.slides.Presentation.(Unknown Source)
at com.xxx.android.util.aspose.Render.lambda$renderPPTToDoc$0(Render.java:41)
at com.xxx.android.util.aspose.Render$$Lambda$1.call(Unknown Source)
at rx.Observable.unsafeSubscribe(Observable.java:10200)
at rx.internal.operators.OperatorSubscribeOn$1.call(OperatorSubscribeOn.java:94)
at rx.internal.schedulers.CachedThreadScheduler$EventLoopWorker$1.call(CachedThreadScheduler.java:228)
at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.ClassNotFoundException: Didn't find class "java.awt.GraphicsEnvironment" on path: DexPathList[[dex file "/data/data/com.xxx.android/files/instant-run/dex/slice-support-annotations-25.0.1_51ab30143fbff50b8779a9626e6d377c1c44e7c7-classes.dex", dex file "/data/data/com.xxx.android/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.xxx.android/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.xxx.android/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.xxx.android/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.xxx.android/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.xxx.android/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.xxx.android/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/com.xxx.android/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/com.xxx.android/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/com.xxx.android/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/com.xxx.android/files/instant-run/dex/slice-rxjava-1.2.1_54f133039d806a8be1611fdfa10ddeaf581790ad-classes.dex", dex file "/data/data/com.xxx.android/files/instant-run/dex/slice-retrofit-2.1.0_c6979fa6cae71817e30942ac3eedc386a7e9ee59-classes.dex", dex file "/data/data/com.xxx.android/files/instant-run/dex/slice-realm-annotations-2.2.0_9ae54c62a7fc94a721dc30bb68708c3b7565799b-classes.dex", dex file "/data/data/com.xxx.android/files/instant-run/dex/slice-picasso2-okhttp3-downloader-1.1.0_a788f4df27ae301cd3666dbf384d3685d56e6316-classes.dex", dex file "/data/data/com.xxx.android/files/instant-run/dex/slice-picasso-2.5.2_9a618bb548845ae95a4547105ce8a9d7094e21bd-classes.dex", dex file "/data/data/com.xxx.android/files/instant-run/dex/slice-org.apmem.tools-layouts-1.10_a02222f6a33923b771d3c89b74b8673de1a5238c-classes.dex", dex file "/data/data/com.xxx.android/files/instant-run/dex/slice-okio-1.9.0_72008d956fd4441e9a533e6

Furthermore, is there an existing github project as a reference I could have a look at which contains all the necessary files and libraries that I require to do that conversion?

Hi,


I have observed your comments. I request you to please share source presentation so that we can investigate issue in details to help you out.

Best Regards,

Hi,

I have observed your requirements and regret to share that at present there is no rendering support available in Aspsoe.Slides for Android. For this reason you may not export presentation to PDF, Tiff or even generating slide thumbnails. I suggest you to please try using Aspose.Slides for Cloud that offers much more features and even provide support of Android SDK as well for working in android environment. Please visit this web link for your kind reference in this regard.

Many Thanks,