Visio VSDX
Work with Visio diagrams using the source-preview packages
VSDX support is available from source. Try the diagram editor or build the packages from the repository. The packages are not yet published on npm, crates.io, or PyPI.
Rust packages
See the crate READMEs for API details and supported operations.
| Crate | Purpose |
|---|---|
betteroffice-vsdx | Native facade |
betteroffice-vsdx-parse | Package parsing and lossless XML |
betteroffice-vsdx-resolve | ShapeSheet inheritance |
betteroffice-vsdx-eval | Formula evaluation |
betteroffice-vsdx-render | Display lists |
betteroffice-vsdx-edit | Transactional editing and collaboration |
betteroffice-vsdx-formula | Bounded formula parsing |
betteroffice-vsdx-validate skips the overlapping-shape and connector-crossing
rules on pages where more than MAX_PAIRWISE_SHAPES (2,000) shapes have scene
bounds.
JavaScript and React
@betteroffice/vsdx provides the Wasm engine and Canvas display-list painter. Initialize the Wasm module before opening a diagram.
@betteroffice/vsdx-react provides the React editor. Its strings are supplied by @betteroffice/vsdx-i18n. Pass font bytes to the editor so layout and painting use the same faces.
Rendering
Linear fill gradients render; non-linear FillGradientDir values, an
unresolvable stop and gradients with fewer than two stops fall back to the solid
fill with a fidelity diagnostic, and a stop with GradientStopColorTrans is
painted opaque and reported. Connectors route without Visio's obstacle
avoidance. Line jumps draw in the arc and gap styles; other jump styles and
last-routed (3) crossings stay unbridged, and a page past the crossing-detection
budget renders with no line jumps at all. The native PNG backend,
betteroffice-vsdx-raster, sets each run in the face registered for its family,
else a registered Arial or sans-serif face, else Carlito Regular, without
small caps, superscripts or subscripts,
and draws images other than JPEG and PNG as dashed placeholders counted in
skipped_images.
Python
The Python binding reads pages, shapes, cells, and connections. Build it from a repository checkout:
python -m pip install ./bindings/python-vsdxVSDX files are not supported by the redaction CLI.