spire.presentation for java 3.9.6现已发布。该版本支持获取动画的效果,同时也修复了.ppt转pdf时出现的问题。详情如下。
新功能:
- 支持获取动画的效果。
presentation presentation = new presentation();
presentation.loadfromfile("data/animation.pptx");
for (int c = 0; c < presentation.getslides().getcount(); c ) {
islide slide = presentation.getslides().get(c);
for (int i = 0; i < slide.gettimeline().getmainsequence().getcount(); i ) {
animationeffect animationeffect = slide.gettimeline().getmainsequence().get(i);
//预设类型,比如entrance,emphasis,exit,path
string presetclasstype = animationeffect.getpresetclasstype().getname();
//获取动画效果类型
animationeffecttype animationeffecttype= animationeffect.getanimationeffecttype();
//获取目标shape
shape shape = animationeffect.getshapetarget();
//获取动画效果子类型
string subtype = animationeffect.getsubtype().getname();
//获取color
color color = animationeffect.getcolor();
//当动画效果类型为faded_zoom时,获取vanishing point(消失点)
if (animationeffecttype.equals(animationeffecttype.faded_zoom)) {
string vanishingpointname = animationeffect.getvanishingpoint().getname();
}
//获取wave动画效果
if (animationeffecttype.equals(animationeffecttype.wave)) {
textanimationcollection textanimations = slide.gettimeline().gettextanimations();
if (textanimations.size() > 0) {
for (int j = 0; j < textanimations.size(); j ) {
paragraphbuildtype buildtype = textanimations.get(j).getparagraphbuildtype();
}
}
}
}
}
问题修复:
- 修复了转换.pptx to pdf程序抛"nullpointerexception "的问题。
- 修复了了转换.pptx to pdf图表坐标轴内容格式不正确的问题。
获取spire.presentation for java 3.9.6,请点击:
https://www.e-iceblue.cn/downloads/spire-presentation-java.html