← 返回命令列表

Linux command

drawio 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Open diagram editor

drawio

Open specific file

drawio [diagram.drawio]

Export to PNG

drawio --export --format png [diagram.drawio]

Export to PDF

drawio --export --format pdf [diagram.drawio]

Export specific page

drawio --export --page-index [0] [diagram.drawio]

Export with transparent background

drawio --export --transparent [diagram.drawio]

Export at specific scale

drawio --export --scale [2] [diagram.drawio]

说明

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.

参数

--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.

FAQ

What is the drawio command used for?

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.

How do I run a basic drawio example?

Run `drawio` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --export do in drawio?

Export mode (don't show UI).