Learn how to Convert Visio to SVG in Python : https://blog.aspose.com/diagram/convert-visio-to-svg-in-python/
This article covers the following topics:
Learn how to Convert Visio to SVG in Python : https://blog.aspose.com/diagram/convert-visio-to-svg-in-python/
This article covers the following topics:
# This code example demonstrates how to convert Visio diagram to SVG. | |
# Initialize a Diagram class | |
diagram = Diagram("C:\Files\Sample.vsdx") | |
# Save diagram in SVG format | |
diagram.save("C:\Files\Sample_out.svg", SaveFileFormat.SVG) |
# This code example demonstrates how to convert a specific page of a Visio diagram into SVG. | |
# Initialize a Diagram class | |
diagram = Diagram("C:\Files\Sample.vsdx") | |
# Initialize Image save options for SVG | |
options = saving.ImageSaveOptions(SaveFileFormat.SVG) | |
# Save one page only, by page index | |
options.page_index = 1 | |
# Save diagram as SVG | |
diagram.save("C:\Files\ExportPageToImage_out.svg", options) |