为有中文需求的客户提供多渠道中文技术支持.

Tue Jan 31, 2023 8:38 am

Spire.Presentation For Java 8.1.2,授权正式版授权正式版 (授权key之前已发过邮件) 同 SPIREPPT-2151
部分文件截图,出现NullPointerException错误


文件传不上来,放到这里了 https://netcut.cn/1go3ff3fv

错误如下:
Code: Select all
java.lang.NullPointerException
        at com.spire.presentation.packages.sprvsm.spr┥(Unknown Source)
        at com.spire.presentation.converter.openxml.PptxBaseXmlElement.getEnumAttribute(Unknown Source)
        at com.spire.presentation.TextParagraphProperties.spr︻∯(Unknown Source)
        at com.spire.presentation.TextStyle.spr┢∯(Unknown Source)
        at com.spire.presentation.packages.sprkbp.spr┢∯(Unknown Source)
        at com.spire.presentation.packages.sprkbp.<init>(Unknown Source)
        at com.spire.presentation.packages.sprkbp.spr∬┹(Unknown Source)
        at com.spire.presentation.packages.sprune.<init>(Unknown Source)
        at com.spire.presentation.collections.ShapeList.spr┩┹(Unknown Source)
        at com.spire.presentation.collections.ShapeList.spr┖┺(Unknown Source)
        at com.spire.presentation.GroupShape.<init>(Unknown Source)
        at com.spire.presentation.GroupShape.<init>(Unknown Source)
        at com.spire.presentation.ActiveSlide.spr∮┸(Unknown Source)
        at com.spire.presentation.ActiveSlide.<init>(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();

liheyuan
 
Posts: 24
Joined: Fri Nov 11, 2022 9:20 am

Wed Feb 01, 2023 3:43 am

您好,

感谢你的反馈。
经过测试,我复现了您的问题,我已经将该问题记录到我们的bug追踪系统中,编号:SPIREPPT-2167,这个问题一旦被修复,我们会及时通知您。给您带来不便,我们感到非常抱歉。

Sincerely,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Thu Feb 23, 2023 6:30 am

您好,

很高兴通知您SPIREPPT-2167问题已经修复了,请下载最新版本 Spire.Presentation for Java 版本: 8.2.1测试。
网站下载链接:https://www.e-iceblue.cn/Downloads/Spire-Presentation-JAVA.html
Maven 仓库安装:
Code: Select all
<repositories>
    <repository>
        <id>com.e-iceblue</id>
        <name>e-iceblue</name>
        <url>https://repo.e-iceblue.cn/repository/maven-public/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupId>e-iceblue</groupId>
        <artifactId>spire.presentation</artifactId>
        <version>8.2.1</version>
    </dependency>
</dependencies>


Sincerely,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Return to 中文技术支持