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.

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.

QUICK EXAMPLE

Use the supported API

Import the package root unless a subpath is shown in the sample.

Legacy Visio · TypeScript
TypeScript
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