Skip to main content

Crate libvisio_rs

Crate libvisio_rs 

Source
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§

VisioDocument
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.