Android调用ppt转pdf,aspose抛出异常导致应用crash

android使用slide java,将ppt文档转换为pdf文档的时候,出现IllegalStateException,导致应用进程crash。 该ppt文档1.76M,sdk : aspose-slides-22.9-android.via.java.jar 详细报错如下:

java.lang.ExceptionInInitializerError
	at com.aspose.slides.internal.hs.do.do(Unknown Source:0)
	at com.aspose.slides.internal.hs.for.int(Unknown Source:97)
	at com.aspose.slides.internal.hs.for.for(Unknown Source:17)
	at com.aspose.slides.internal.hs.for.do(Unknown Source:21)
	at com.aspose.slides.internal.he.do.do(Unknown Source:7)
	at com.aspose.slides.internal.he.do.do(Unknown Source:17)
	at com.aspose.slides.internal.he.else.<init>(Unknown Source:11)
	at com.aspose.slides.internal.hf.for.do(Unknown Source:38)
	at com.aspose.slides.internal.hf.for.<init>(Unknown Source:61)
	at com.aspose.slides.internal.hf.do.do(Unknown Source:23)
	at com.aspose.slides.internal.hf.do.do(Unknown Source:63)
	at com.aspose.slides.internal.hf.do.do(Unknown Source:19)
	at com.aspose.slides.internal.fu.catch.new(Unknown Source:7)
	at com.aspose.slides.ms.backend.android.System.Drawing.int.do(Unknown Source:4)
	at com.aspose.slides.ms.backend.android.System.Drawing.int.do(Unknown Source:39)
	at com.aspose.slides.internal.hb.case.do(Unknown Source:51)
	at com.aspose.slides.internal.hb.goto.do(Unknown Source:10)
	at com.aspose.slides.internal.hb.goto.if(Unknown Source:18)
	at com.aspose.slides.e.do(Unknown Source:111)
	at com.aspose.slides.e.do(Unknown Source:2)
	at com.aspose.slides.e.do(Unknown Source:170)
	at com.aspose.slides.s9.do(Unknown Source:507)
	at com.aspose.slides.s9.do(Unknown Source:92)
	at com.aspose.slides.s9.do(Unknown Source:435)
	at com.aspose.slides.s9.do(Unknown Source:15)
	at com.aspose.slides.ae.do(Unknown Source:242)
	at com.aspose.slides.ans.do(Unknown Source:4)
	at com.aspose.slides.ue.do(Unknown Source:144)
	at com.aspose.slides.are.for(Unknown Source:10)
	at com.aspose.slides.are.do(Unknown Source:270)
	at com.aspose.slides.are.do(Unknown Source:14)
	at com.aspose.slides.Slide.do(Unknown Source:86)
	at com.aspose.slides.alc.do(Unknown Source:265)
	at com.aspose.slides.alc.do(Unknown Source:19)
	at com.aspose.slides.Presentation.do(Unknown Source:464)
	at com.aspose.slides.Presentation.do(Unknown Source:4)
	at com.aspose.slides.Presentation.save(Unknown Source:5)
	.....应用调用堆栈
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:930)
Caused by: java.lang.IllegalStateException: Resource file System/Drawing/rswop.icm not found in assembly
	at com.aspose.slides.ms.core.resources.ResourcesLoader.loadResource(Unknown Source:31)
	at com.aspose.slides.internal.ht.void.do(Unknown Source:2)
	at com.aspose.slides.internal.ht.void.do(Unknown Source:4)
	at com.aspose.slides.internal.hs.do.<clinit>(Unknown Source:7)
	... 56 more

@Ezreal056Q,
感谢您联系支持人员。

如果可能,请使用最新版本的 Aspose.Slides 检查您的结果。 如果问题仍然存在,请分享以下数据和信息:

  • PowerPoint 演示文稿文件
  • 重现错误的代码示例或简单项目
  • 执行代码的操作系统版本
  • 您应用中的 JDK 版本
  1. PowerPoint 文稿在附件中;
  2. 代码,是完全按照API写的:
   FileOutputStream os = new FileOutputStream (targetFile);
   Presentation ppt = new Presentation(sourceFile);
   ppt.save(os, com.aspose.slides.SaveFormat.Pdf);
  1. 在HUAWEI harmonyos 3.0上;
  2. JDK 11和JDK1.8均有该问题。

四种配色时尚商务PPT模板.zip (1.6 MB)

请帮助提供解决方法。感谢。

@Andrey_Potapov

@Ezreal056Q,
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESANDROID-471

You can obtain Paid Support services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@Andrey_Potapov With Issue ID,Where should I go to check if my problem has been solved?

@Ezreal056Q,
You can check the issue status at the bottom of the forum thread. The issue has already been resolved. A fix will be included in Aspose.Slides for Android via Java 23.2. This release will be published in the second half of February.

The issues you found earlier (filed as SLIDESANDROID-471) have been fixed in Aspose.Slides for Java 23.2 (JAR).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.