问题描述:
PPT读取SVG画布效果有误差
开发环境:Java8 Win10系统
工具包版本 Aspose.Slide 19.11
PPT效果图:
PPT效果图.png (14.2 KB)
抽取出来的元素写成SVG效果图:
SVG效果图.png (7.9 KB)
可以看看出svg效果图有明显缺失
部分关键代码如下:
public static String write(IShape shape) {
String pathname = PptConfig.getPath() + PptConfig.getName() + "/";
File path = new File(pathname);
if (!path.exists()) {
path.mkdirs();
}
String sourceName = "media/" + System.nanoTime() + ".svg";
try {
FileOutputStream os = new FileOutputStream(pathname + sourceName);
shape.writeAsSvg(os);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
return sourceName;
}