Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/b1f6c1c4/draw.io-export

Convert draw.io xml to pdf/png within command line. (diagrams.net)
https://github.com/b1f6c1c4/draw.io-export

automation diagramsnet draw-io drawio mxgraph pdf png

Last synced: 15 days ago
JSON representation

Convert draw.io xml to pdf/png within command line. (diagrams.net)

Awesome Lists containing this project

README

        

# draw.io-export

Convert [draw.io](https://app.diagrams.net/) 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.

## Usage with `npm`

```bash
npm install --global draw.io-export
drawio -o
drawio -o
drawio -F -o
```

## 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
- `cat-pdf` All pages used, concatenated
- `split-png` All pages used, separate files with name `<#>.png`
- `split-pdf` All pages used, separate files with name `<#>.pdf`
- `split-index-png` Alias for `split-png`
- `split-index-pdf` Alias for `split-pdf`
- `split-id-png` All pages used, separate files with name `.png`
- `split-id-pdf` All pages used, separate files with name `.pdf`
- `split-name-png` All pages used, separate files with name `.png`
- `split-name-pdf` All pages used, separate files with name `.pdf`

## Usage with Docker

```bash
docker run --rm \
-v :/files \
b1f6c1c4/draw.io-export []
```

- All above formats are supported
- If not specified, generate both `png` and `cat-pdf`