Spire.Presentation for Java 8.12.1 已发布。本次更新提升了 PPT 到 SVG 的转换速度,同时新增支持加载带密码的流文件、通过坐标创建不规则的多边形以及通过两个点来绘制线条的功能。详情请阅读以下内容。
新功能:
- 提高转换PPT到SVG的速度。
- 新增加载带密码的流文件的方法。
- 支持通过坐标创建不规则的多边形的功能。
- 支持通过两个点来绘制线条的功能。
presentation.loadFromStream(inputStream, FileFormat.AUTO,"password");
Presentation ppt = new Presentation();
ISlide slide = ppt.getSlides().get(0);
List<Point2D> points = new ArrayList<>();
points.add(new Point2D.Float(50f, 50f));
points.add(new Point2D.Float(50f, 150f));
points.add(new Point2D.Float(60f, 200f));
points.add(new Point2D.Float(200f, 200f));
points.add(new Point2D.Float(220f, 150f));
points.add(new Point2D.Float(150f, 90f));
points.add(new Point2D.Float(50f, 50f));
IAutoShape autoShape = slide.getShapes().appendFreeformShape(points);
autoShape.getFill().setFillType(FillFormatType.NONE);
ppt.saveToFile("out.pptx", FileFormat.PPTX_2013);
ppt.dispose();
Presentation ppt = new Presentation();
ppt.getSlides().get(0).getShapes().appendShape(ShapeType.LINE, new Point2D.Float(50, 70), new Point2D.Float(150, 120));
ppt.saveToFile( "result.pptx ,FileFormat.PPIX_2013),
ppt.dispose().
获取Spire.Presentation for Java 8.12.1请点击:
https://www.e-iceblue.cn/Downloads/Spire-Presentation-JAVA.html