Spire.Presentation for Java 4.3.2已发布。该版本优化了转换PPT到PDF的时间,新增了添加自定义路径动画的功能,增强了转换PPTX到图片的功能。此外,版本还支持了添加 、检测和移除数字签名的功能。详情请阅读以下内容。
优化:
- 优化了转换PPT到PDF的时间
新功能:
- 支持了添加自定义路径动画的功能
Presentation ppt = new Presentation();
//Add shape
IAutoShape shape = ppt.getSlides().get(0).getShapes().appendShape(ShapeType.RECTANGLE,new Rectangle(0, 0, 200, 200));
//Add animation
AnimationEffect effect = ppt.getSlides().get(0).getTimeline().getMainSequence().addEffect(shape, AnimationEffectType.PATH_USER);
CommonBehaviorCollection common = effect.getCommonBehaviorCollection();
AnimationMotion motion = (AnimationMotion)common.get(0);
motion.setOrigin(AnimationMotionOrigin.LAYOUT);
motion.setPathEditMode(AnimationMotionPathEditMode.RELATIVE);
MotionPath moinPath = new MotionPath();
moinPath.addPathPoints(MotionCommandPathType.MOVE_TO,new Point2D.Float[]{new Point2D.Float(0,0)},MotionPathPointsType.CURVE_AUTO,true);
moinPath.addPathPoints(MotionCommandPathType.LINE_TO,new Point2D.Float[]{new Point2D.Float
(0.1f,0.1f)},MotionPathPointsType.CURVE_AUTO,true);
moinPath.addPathPoints(MotionCommandPathType.LINE_TO,new Point2D.Float[]{new Point2D.Float(-
0.1f,0.2f)},MotionPathPointsType.CURVE_AUTO,true);
moinPath.addPathPoints(MotionCommandPathType.END,new Point2D.Float[]{},MotionPathPointsType.CURVE_AUTO,true);
motion.setPath(moinPath);
ppt.saveToFile(outputFile, FileFormat.PPTX_2010);
ppt.dispose();
Presentation ppt =new Presentation();
ppt.loadFromFile(input);
//Adds digital signature
ppt.addDigitalSignature("C:/gary.pfx", "e-iceblue","Gary", new Date());
ppt.saveToFile(result,FileFormat.PPTX_2013);
//Checks if the document is signed
boolean digitalSigned = ppt2.isDigitallySigned();
if (ppt2.isDigitallySigned() == true)
{
//Removes digital signature
ppt2.removeAllDigitalSignatures();
}
问题修复:
- 修复了转换幻灯片到图片时阴影效果丢失的问题
- 修复了转换PPTX到图片时程序抛“NullPointerException”异常的问题
获取Spire.Presentation for Java 4.3.2请点击:
https://www.e-iceblue.cn/Downloads/Spire-Presentation-JAVA.html