部分文件截图,出现AppException错误
文件传不上来,放到这里了 https://netcut.cn/1go3ggnf4
错误如下:
- Code: Select all
com.spire.presentation.AppException: Property not found
at com.spire.presentation.drawing.animation.CommonBehavior.spr▉≂(Unknown Source)
at com.spire.presentation.drawing.animation.CommonBehavior.spr▌≂(Unknown Source)
at com.spire.presentation.drawing.animation.AnimationProperty.spr▌≂(Unknown Source)
at com.spire.presentation.collections.AnimationEffectCollection.spr︻┭(Unknown Source)
at com.spire.presentation.collections.AnimationEffectCollection.spr︻┭(Unknown Source)
at com.spire.presentation.collections.AnimationEffectCollection.spr︻┭(Unknown Source)
at com.spire.presentation.collections.AnimationEffectCollection.spr⁆┮(Unknown Source)
at com.spire.presentation.drawing.animation.TimeLine.spr╼∯(Unknown Source)
at com.spire.presentation.packages.sprdlp.spr〠┸(Unknown Source)
at com.spire.presentation.packages.sprdlp.<init>(Unknown Source)
at com.spire.presentation.packages.sprskp.spr⅓┹(Unknown Source)
at com.spire.presentation.packages.sprskp.spr┅┭(Unknown Source)
at com.spire.presentation.packages.sprskp.spr〠┹(Unknown Source)
at com.spire.presentation.packages.sprskp.<init>(Unknown Source)
at com.spire.presentation.packages.sprskp.<init>(Unknown Source)
at com.spire.presentation.Presentation.spr┲┹(Unknown Source)
at com.spire.presentation.Presentation.loadFromStream(Unknown Source)
at com.yuanfudao.metis.live.ppt.service.PPTServiceImpl.processThumbnails(PPTServiceImpl.java:216)
at Main.processThumbnails(Main.java:44)
at Main.lambda$main$1(Main.java:86)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
重现代码参考:
- Code: Select all
Presentation ppt = new Presentation();
ppt.loadFromStream(in, FileFormat.AUTO);
// all slides
for (int i = 0; i < ppt.getSlides().size(); i++) {
ISlide slide = ppt.getSlides().get(i);
// 转为缩略图,按照目标宽高等比例转化
BufferedImage img = slide.saveAsImage();
ByteArrayOutputStream os = new ByteArrayOutputStream();
ImageIO.write(img, THUMBNAIL_FORMAT, os);
byte [] byttes = i, os.toByteArray();