Skip to content

Fork of the original draw.io-export repository with functionality for batch conversion of multiple drawio files into PDF and PNG.

License

Notifications You must be signed in to change notification settings

michaelgrigoryan25/draw.io-export

 
 

Repository files navigation

draw.io-export

This repository is a fork of draw.io-export maintained by b1f6c1c4, with additional features such as batch conversion with glob pattern matching and the ability for supplying multiple .drawio files.


Convert draw.io XML files (usually *.drawio) to PDF/PNG within the command line.

Installing Locally

git clone --depth=1 https://github.com/michaelgrigoryan25/draw.io-export
npm install --global ./draw.io-export
drawio --help

Example Usage

Default behavior

When glob pattern matching is disabled, you can directly supply the paths of the files, and they will be exported accordingly:

drawio file1.drawio file2.drawio

With glob pattern matching

When glob pattern matching is enabled the outputs of the files will have the same name as the original files and will be postfixed with .exported.{format}. The files will be exported in the same directory that the drawio files were found from:

drawio -G "./*.drawio" "../*.drawio"

Flags

Glob conversion -G|--glob

This flag enables specifying glob patterns for matching drawio files. By default, this flag is set to false. You have to explicitly specify it to use glob patterns.

Supported formats -F|--fmt

  • If not specified, automatically detect png or pdf
  • png Only the first page is used
  • pdf Only the first page is used

About

Fork of the original draw.io-export repository with functionality for batch conversion of multiple drawio files into PDF and PNG.

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • JavaScript 87.5%
  • Shell 9.0%
  • Dockerfile 3.5%