Extending Existing VSDX Files

The VsdxIO class can modify an existing VSDX file. The fromBlob method can parse a VSDX file blob to a VsdxPackage:

// create a vsdxIO instance with a vsdxPackage parsed from a given blob
const vsdxIO = await VsdxIO.fromBlob(blob)

// render the diagram on an existing page
await vsdxIO.addGraph({
  graphComponent: graphComponent,
  page: vsdxIO.vsdxPackage.pages.first()
})