Expand description
libvisio-rs — A Rust library for parsing Microsoft Visio files and converting to SVG.
Supports both .vsdx (ZIP+XML, Open Packaging) and .vsd (OLE2 binary) formats. Produces high-quality SVG output with themes, gradients, shadows, rich text, embedded images, connectors, and more.
§Examples
use libvisio_rs::{convert, get_page_info, extract_text};
// Convert all pages to SVG
let svg_files = convert("diagram.vsdx", Some("/tmp/output"), None).unwrap();
// Get page info
let pages = get_page_info("diagram.vsdx").unwrap();
// Extract text
let text = extract_text("diagram.vsdx").unwrap();Modules§
- error
- Error types for libvisio-rs.
- model
- Common data model for Visio documents.
- svg
- SVG renderer module.
- vsd
- .vsd (binary/OLE2) parser module.
- vsdx
- .vsdx (ZIP+XML) parser module.
Structs§
- Visio
Document - Opaque handle to a parsed Visio document.
Constants§
- ALL_
EXTENSIONS - All supported file extensions.
- BINARY_
EXTENSIONS - Supported file extensions for binary formats.
- XML_
EXTENSIONS - Supported file extensions for XML-based formats.
Functions§
- convert
- Convert a Visio file to SVG pages.
- convert_
page_ to_ svg - Convert a single page to SVG string (no file output).
- extract_
text - Extract all text from a Visio file.
- get_
page_ info - Get page information from a Visio file.
- is_
supported - Check if a file extension is supported.
- parse
- Parse a Visio file and return the parsed document.
- visio_
convert_ ⚠page_ to_ svg - Convert a page to SVG. Returns null on error. Caller must free with visio_free_string.
- visio_
extract_ ⚠text - Extract all text from the document. Caller must free with visio_free_string.
- visio_
free ⚠ - Free a VisioDocument handle.
- visio_
free_ ⚠string - Free a string returned by visio_convert_page_to_svg or visio_extract_text.
- visio_
get_ ⚠page_ count - Get the number of pages.
- visio_
open ⚠ - Open and parse a Visio file. Returns null on error.