Spire.Presentation for Java 8.4.1已发布。本次更新支持通过文本宽度调整表格列宽和设置形状的圆角半径。同时支持使用自定义布局添加新幻灯片。此外,一些已知问题也在该版本中被成功修复,如设置SeriesLinesColor后,打开文档时出现错误消息的问题。详情请阅读以下内容。
新功能:
- 支持通过文本宽度调整表格列宽。
- 支持设置形状的圆角半径。
- 支持使用自定义布局添加新幻灯片。
- 在添加 SmartArt 时,支持设置 SmartArtLayoutType.PICTURE_ORGANIZATION_CHART 和 SmartArtLayoutType.NAME_and_TITLE_Arganization_CHART。
Presentation ppt = new Presentation();
ppt.loadFromFile(inputFile);
ITable table = (ITable) ppt.getSlides().get(0).getShapes().get(0);
table.getColumnsList().get(2).adjustColumnByTextWidth();
ppt.saveToFile(outputFile, FileFormat.AUTO);
IAutoShape autoShape=iSlide.getShapes().appendShape(ShapeType.ROUND_CORNER_RECTANGLE,new Rectangle2D.Float(50,50,150,150));
IAutoShape autoShape1=iSlide.getShapes().appendShape(ShapeType.ONE_ROUND_CORNER_RECTANGLE,new Rectangle2D.Float(250,50,150,150));
IAutoShape autoShape2=iSlide.getShapes().appendShape(ShapeType.ONE_SNIP_ONE_ROUND_CORNER_RECTANGLE,new Rectangle2D.Float(450,50,150,150));
IAutoShape autoShape3=iSlide.getShapes().appendShape(ShapeType.TWO_DIAGONAL_ROUND_CORNER_RECTANGLE,new Rectangle2D.Float(50,250,150,150));
IAutoShape autoShape4=iSlide.getShapes().appendShape(ShapeType.TWO_SAMESIDE_ROUND_CORNER_RECTANGLE,new Rectangle2D.Float(250,250,150,150));
autoShape.setRoundRadius(autoShape.getWidth()/3);
autoShape1.setRoundRadius(autoShape1.getWidth()/3);
autoShape2.setRoundRadius(autoShape2.getWidth()/3);
autoShape3.setRoundRadius(autoShape3.getWidth()/3);
autoShape4.setRoundRadius(autoShape4.getWidth()/3);
Presentation presentation = new Presentation();
presentation.loadFromFile(intputFile);
//获取自定义布局
ILayout iLayout = presentation.getMasters().get(0).getLayouts().get(1);
//附件新幻灯片
presentation.getSlides().append(iLayout);
//插入新幻灯片
presentation.getSlides().insert(0, iLayout);
presentation.saveToFile(outputFile, FileFormat.PPTX_2016);
presentation.dispose();
ppt.getSlides().get(0).getShapes().appendSmartArt(50, 50, 250, 250, SmartArtLayoutType.PICTURE_ORGANIZATION_CHART);
ppt.getSlides().append().getShapes().appendSmartArt(50, 50, 250, 250, SmartArtLayoutType.NAME_AND_TITLE_ORGANIZATION_CHART);
问题修复:
- 修复了设置SeriesLinesColor后,打开文档时出现错误消息的问题。
- 修复了将Html文件转换为PPT时没有输出文件的问题。
- 修复了在将PPT转换为图像时应用程序抛出“OutOfMemoryError”的问题。
- 修复了将PPT转换为SVG时,程序长时间挂起的问题。
获取Spire.Presentation for Java 8.4.1请点击
https://www.e-iceblue.cn/Downloads/Spire-Presentation-JAVA.html