Back to Home
Documentation

Reference

draw.io Export

How draw.io export works internally and when to choose it over PNG output.

draw.io export is not a screenshot or a separate layout path. It uses the same resource model and geometry used for PNG rendering.

This keeps PNG and draw.io outputs aligned while preserving editable structure instead of flattening the result into pixels.

Export pipeline

  • Parse DAC YAML into runtime resources and links.
  • Run the same layout engine used for PNG output, including Scale and ZeroAdjust.
  • Reorder children from link topology to preserve consistent placement.
  • Export resources as mxCell nodes and links as mxCell edges.
  • Embed AWS SVG icons as data URIs so the file is self-contained.
  • Write mxGraphModel XML compatible with diagrams.net / draw.io.

Best use cases

  • Start with code, finish with manual annotations in draw.io.
  • Generate a baseline diagram for non-technical teams to edit later.
  • Keep editable diagrams in repositories while still using code for the initial layout.