Skip to content

Repository files navigation

VSDX → HTML Converter

Convert Microsoft Visio files (.vsdx) to interactive, standalone HTML — no Visio license or internet connection required.

Getting started after clone

# 1. Install the vsdx library (not on PyPI — install from GitHub)
pip3 install git+https://github.com/dave-howard/vsdx.git
# 2. Install the converter as a local editable package
pip3 install -e .# 3. Convert a file
convert diagram.vsdx

Usage

convert diagram.vsdx # → diagram.html (same directory)
convert diagram.vsdx -o output.html # custom output path
convert diagram.vsdx --theme corporate # with theme
convert *.vsdx # batch conversion
convert --list-themes # show available themes
convert --version # show version

Available themes

ThemeDescription
defaultPreserves Visio colors
corporateProfessional dark tones with subtle shadows
modernMinimalist pastels with rounded corners

Testing

Generate test files and run the test suite:

python3 tests/create_test_vsdx.py # generate test .vsdx files (run once)
python3 -m pytest tests/test_converter.py -v

The test files are excluded from version control (.gitignore), so create_test_vsdx.py must be run after each fresh clone.

Test coverage

ClassWhat is tested
TestParserParsing nodes, edges, coordinates, text, multi-page, empty pages, error handling
TestRendererHTML output, SVG content, themes, tab navigation, auto-fit JS, orthogonal paths
TestThemesTheme lookup, required fields, color override flags

Architecture

.vsdx → parser → JSON graph → renderer → .html
LayerFileResponsibility
Parserparser/vsdx_parser.pyReads .vsdx (ZIP+XML), extracts shapes, connectors, and pages
IntermediateJSON dictProvider-agnostic graph format (nodes + edges per page)
Rendererrenderer/svg.pyGenerates inline SVG in a standalone HTML file
Themesthemes.pyStyle presets that override Visio colors

Known limitations

  • Legacy .vsd format — binary .vsd files are not supported; open in Visio and save as .vsdx first
  • Master shape style inheritance — complex style inheritance from Visio master pages may differ from the original Visio rendering
  • No cross-diagram navigation — links between connected diagrams are not supported out of the box
  • Zoom/pan — simpler than dedicated diagram viewers such as draw.io

About

Convert Visio .vsdx diagrams to standalone, offline HTML — no Visio license required. Supports multiple themes and multi-page diagrams

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages