Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active December 9, 2022 10:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/f506ef2a4a00f2db8b95e038639ad224 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/f506ef2a4a00f2db8b95e038639ad224 to your computer and use it in GitHub Desktop.
Convert Visio to SVG in Python | VSDX to SVG in Python
# 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment