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