测试文件:
从vsdx转换后的svg文件:
测试代码:
@Test
public void testVsdxSvg() throws Exception {
String sourcePath = “D:\test\aspose\diagram\医学谱图.vsdx”;
String targetPath = “D:\test\aspose\diagram\医学谱图-vsdx.svg”;
Diagram diagram = null;
try {
// 创建Diagram类的实例
diagram = new Diagram(sourcePath);
// create an instance SVG save options class
SVGSaveOptions options = new SVGSaveOptions();
ShapeCollection shapes = options.getShapes();
// get shapes by page index and shape ID, and then add in the shape collection object
for (Object pageObj : diagram.getPages()) {
com.aspose.diagram.Page page = (com.aspose.diagram.Page) pageObj;
ShapeCollection pageShapes = page.getShapes();
for (Object shapeObj : pageShapes) {
Shape shape = (Shape) shapeObj;
shapes.add(shape);
}
}
// save Visio drawing
diagram.save(targetPath, options);
} finally {
if (diagram != null) {
diagram.dispose();
}
}
}
@wxpid1
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): DIAGRAMAPP-3258
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.