Spire.Presentation for Java 7.5.2 已发布。该版本支持设置 SeriesLines 的颜色,还支持按系列设置图表动画效果。同时,该版本还增强了 PPT 到图片和 PPT 到 PDF 的转换。详情请阅读以下内容。
新功能:
- 支持设置 SeriesLines 的颜色。
- 支持按系列设置图表动画效果。
- 修复了 PPT 转图片后部分内容格式不正确的问题。
- 修复了 PPT 转 PDF 抛出空指针异常的问题。
- 修复了 PPT 转 PDF 部分字体嵌入失败的问题。
- 修复了 PPT 转 PDF 后部分内容样式不正确的问题。
Presentation ppt = new Presentation();
ppt.loadFromFile(inputFile);
IChart chart = (IChart) ppt.getSlides().get(1).getShapes().get(3);
TextLineFormat seriesLine = chart.getSeriesLine();
seriesLine.setFillType(FillFormatType.SOLID);
seriesLine.getFillFormat().getSolidFillColor().setColor(Color.RED);
ppt.saveToFile(outputFile, FileFormat.AUTO);
ppt.dispose();
Presentation ppt = new Presentation();
IChart chart = ppt.getSlides().get(0).getShapes().appendChart(ChartType.COLUMN_CLUSTERED,new Rectangle(50,50,400,400));
AnimationEffect effect = ppt.getSlides().get(0).getTimeline().getMainSequence().addEffect(chart, AnimationEffectType.FLY);
GraphicAnimation graphicAnimation = effect.getGraphicAnimation();
if (graphicAnimation != null)
{
graphicAnimation.setBuildType(GraphicBuildType.BUILD_AS_SERIES);
}
问题修复:
获取Spire.Presentation for Java 7.5.2请点击:
https://www.e-iceblue.cn/Downloads/Spire-Presentation-JAVA.html