Ppt获取图像的时候很长时间了都获取不成功?


#1

4f28a3183a898b2f557d9182d56e6a41.ppt.zip (8.8 MB)
代码:
Presentation pres = new Presentation(inFile);
int page_count = pres.getSlides().size();
if (page_count > 150){
page_count = 150;
}
for (int count = 0; count < page_count; count++) {
ISlideCollection slides = pres.getSlides();
ISlide sld = slides.get_Item(count);
System.out.printf("(%d/%d)正在导出图像…\n", count + 1, page_count);

BufferedImage image;
image = sld.getThumbnail(mThumbnailScale, mThumbnailScale);
try {
    ImageWriter imgWriter = ImageIO.getImageWritersByFormatName(mOutFormat).next();
    ImageWriteParam writeParam = imgWriter.getDefaultWriteParam();
    writeParam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
    writeParam.setCompressionQuality(mJpegQuality);
    ImageOutputStream outputStream = new FileImageOutputStream(new File(outPath + count + "." + mOutFormat));
    imgWriter.setOutput(outputStream);
    IIOImage outputImage = new IIOImage(image, null, null);
    imgWriter.write(null, outputImage, writeParam);
    outputStream.flush();
    imgWriter.dispose();
    outputStream.close();
} catch (IOException e) {
    System.out.print(e.getMessage());
}
pres.dispose();
pres = new Presentation(inFile);
System.out.printf("(%d/%d)导出图像完成!\n", count + 1, page_count);

}

使用的版本是: aspose-slides-18.11-jdk16.jar
系统: CentOS Linux release 7.4.1708
CPU: Intel® Xeon® CPU E5-2651 v2 @ 1.80GHz
MEM: 32G

从输出的信息看,应该卡在了第39页!


#2

@jcing,

我使用了Aspose.Slides for Java 18.11.0共享的演示文稿,并且已经能够观察到这个问题。我们的问题跟踪系统中添加了ID为SLIDESJAVA-37420的故障单以解决此问题。此线程已与故障单关联,以便我们在修复问题后与您共享通知。


#3

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