VSD · VISIO
Legacy Visio
API guide
`inspectLegacyVisio` checks a legacy VSD compound file’s VisioDocument signature, version, and TrailerStream pointer bounds. It reports structural facts only.
IMPLEMENTATION NOTES
What works
The inspector validates the header signature, version-dependent pointer layout, trailer type, and trailer range against the declared document size. It returns stream names and trailer metadata when those checks pass.
- Supports the validated V5 and V6+ pointer layouts.
- The generic metadata API can read or update an existing SummaryInformation text property when its value fits the allocated slot.
- Invalid or unsupported structures return
undefinedfrom the inspector.
IMPLEMENTATION NOTES
Known limits
Visio shapes, pages, geometry, and drawing relationships are not decoded or editable. A valid TrailerStream pointer is not a parsed drawing.
- No page preview or rendering API is included.
- No general VSD save or structural edit API is included.
- Metadata edits do not change drawing content and do not add missing properties.
QUICK EXAMPLE
Use the supported API
Import the package root unless a subpath is shown in the sample.
import { inspectLegacyVisio, readLegacyOfficeMetadata } from '@christophervr/ole2';
const inspection = inspectLegacyVisio(vsdBytes);
if (inspection) {
console.log(inspection.version, inspection.trailerLength);
console.log(readLegacyOfficeMetadata(vsdBytes));
}This guide documents the current package API. Unsupported or unsafe operations are described explicitly; format detection alone does not imply content support.
Back to format overview