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