LinuxCommandLibrary

drawio

TLDR

Open diagram editor

$ drawio
copy
Open specific file
$ drawio [diagram.drawio]
copy
Export to PNG
$ drawio --export --format png [diagram.drawio]
copy
Export to PDF
$ drawio --export --format pdf [diagram.drawio]
copy
Export specific page
$ drawio --export --page-index [0] [diagram.drawio]
copy
Export with transparent background
$ drawio --export --transparent [diagram.drawio]
copy
Export at specific scale
$ drawio --export --scale [2] [diagram.drawio]
copy

SYNOPSIS

drawio [options] [file]

DESCRIPTION

drawio (draw.io) is a diagram editor for creating flowcharts, network diagrams, UML, and various other diagrams. The desktop application is based on Electron and works offline.
The tool supports multiple export formats including PNG, SVG, PDF, and various XML formats. Diagrams can also be embedded in other documents.

PARAMETERS

--export

Export mode (don't show UI).
--format fmt
Export format (png, jpg, svg, pdf, vsdx, xml).
--output file
Output file name.
--page-index n
Page to export (0-based).
--page-range range
Pages to export.
--transparent
Transparent background.
--scale n
Scale factor for export.
--width n
Output width.
--height n
Output height.
--border n
Border width.
--crop
Crop to diagram bounds.

CAVEATS

Desktop app requires Electron. Large diagrams may be slow. Some features differ from web version. Command-line export needs display or xvfb.

HISTORY

draw.io was created by JGraph Ltd (Gaudenz Alder and David Benson) around 2012. Originally web-only, the desktop application was released later. The tool became popular for its free availability and integration with cloud storage services. In 2020, it was rebranded to diagrams.net.

SEE ALSO

inkscape(1), plantuml(1), graphviz(1), dia(1)

Copied to clipboard