Convert Visio .vsdx to other file formats.
Project description
Visio VSDX to File Converter
A Python utility for batch converting Microsoft Visio VSDX files to other using the Visio COM interface
Possible file formats: "html", "png", "jpg", "gif", "tif", "bmp", "emf", "wmf", "svg"
Features
- Convert a single
.vsdxfile to individual files (one per Visio page) - Batch-convert all
.vsdxfiles in a directory - Leverages the official Microsoft Visio COM interface for reliable conversion
Requirements
- Windows operating system
- Microsoft Visio installed (required for the COM Automation)
- Python 3.7+
Installation
pip install visioconverter
Clone or download this repository. Usage
- Import and Use in Python from converter import Converter
Convert a single .vsdx file to other format
other_files = Converter.vsdx2other(
src_path="diagram.vsdx",
out_format="png", # Possible: "html", "png", "jpg", "gif", "tif", "bmp", "emf", "wmf", "svg"
out_dir="output_svgs", # optional, defaults to same as source
visible=False # optional, show Visio UI?
)
Batch-convert all .vsdx files in a folder
Converter.folder_vsdx2other(
src_folder="vsdx_files",
out_format="png", # Possible: "html", "png", "jpg", "gif", "tif", "bmp", "emf", "wmf", "svg"
out_folder="output_files", # optional, defaults to source folder
visible=False
)
- From Command Line No CLI interface is included by default. See Python sample above or integrate as needed.
Reference
Converter.vsdx2other(src_path, out_dir=None, visible=False) -> list[str]
src_path: Path to a .vsdx file.
out_dir: Output directory (default: same as source file).
visible: Whether to show the Visio UI (default: False).
Returns list of file paths created.
Converter.folder_vsdx2other(src_folder, out_folder=None, visible=False)
src_folder: Folder containing .vsdx files.
out_folder: Where to save files (default: same as each source file).
visible: Whether to show the Visio UI.
Notes
Requires Microsoft Visio to be installed and licensed on your system. Only Windows is supported (due to COM automation). Each page in a Visio document is exported as a separate SVG (_pageX.svg). Error messages are printed to stdout.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file visioconverter-1.0.0.tar.gz.
File metadata
- Download URL: visioconverter-1.0.0.tar.gz
- Upload date:
- Size: 94.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd08cf0644668e61ea22ca058c4d04b7fce091ae7e4ddd6c60959bdf60cac445
|
|
| MD5 |
fd7105844cdb537f12012f1d968b0c39
|
|
| BLAKE2b-256 |
8a1954427b2e663f83c1b7f667e4a2e53bdb9b90c7a1822e29a4ab4de97926ee
|
File details
Details for the file visioconverter-1.0.0-py3-none-any.whl.
File metadata
- Download URL: visioconverter-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d8276729e073abfc23efbbccbc669302f36240e450782b2a39932311f065bdb
|
|
| MD5 |
127b82f1d30a401f23877e3e59326af0
|
|
| BLAKE2b-256 |
1554904b7b1438aed0590db49398ceb9243ac2b5ca64da38e7ffb0b24db29efb
|