Convert draw.io xml file (usually *.drawio
) to pdf
/png
within command line.
Works nicely with make
and/or latexmk
. Useful if you are writing a paper or thesis with many figures.
npm install --global draw.io-export
drawio <source.drawio> -o <dest.pdf>
drawio <source.drawio> -o <dest.png>
drawio <source.drawio> -F <format> -o <dest>
- If not specified, automatically detect
png
orpdf
png
Only the first page is usedpdf
Only the first page is usedcat-pdf
All pages used, concatenatedsplit-png
All pages used, separate files with name<dest><#>.png
split-pdf
All pages used, separate files with name<dest><#>.pdf
split-index-png
Alias forsplit-png
split-index-pdf
Alias forsplit-pdf
split-id-png
All pages used, separate files with name<dest><diagram-id>.png
split-id-pdf
All pages used, separate files with name<dest><diagram-id>.pdf
split-name-png
All pages used, separate files with name<dest><page-name>.png
split-name-pdf
All pages used, separate files with name<dest><page-name>.pdf
docker run --rm \
-v <your folder with .drawio files>:/files \
b1f6c1c4/draw.io-export [<fmt>]
- All above formats are supported
- If not specified, generate both
png
andcat-pdf