export_drawio
Export draw.io diagram XML to SVG or PNG image files. SVG conversion is done locally; PNG uses a headless browser when available.
Instructions
Exports a draw.io diagram XML to an SVG or PNG file. For SVG export, the diagram is converted locally without requiring a browser. For PNG export, a headless browser (puppeteer) is used if available. Returns the file path of the exported image.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | The draw.io XML content (mxGraphModel format) to export | |
| format | No | Export format. Default: svg | |
| output_path | No | Output file path. If not specified, a temporary file is created. | |
| width | No | Output width in pixels (PNG only). Default: 800 | |
| height | No | Output height in pixels (PNG only). Default: 600 |