# draw.io-export

> Convert draw.io xml to pdf/png within command line.

Latest version **0.3.0** (published 2023-07-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install draw.io-export
pnpm add draw.io-export
yarn add draw.io-export
bun add draw.io-export
```

Provides the command `drawio`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2023-07-22 |
| First published | 2018-06-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 11.1 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 66 |
| Author | b1f6c1c4 |
| Maintainers | b1f6c1c4 |
| Keywords | draw-io, drawio, mxgraph, automation |

## Links

- npm: https://www.npmjs.com/package/draw.io-export
- Repository: https://github.com/b1f6c1c4/draw.io-export
- Homepage: https://github.com/b1f6c1c4/draw.io-export#readme
- Issues: https://github.com/b1f6c1c4/draw.io-export/issues
- npm.io page: https://npm.io/package/draw.io-export

## Dependencies (6)

- [axios](https://npm.io/package/axios.md) ^0.27.2
- [yargs](https://npm.io/package/yargs.md) ^17.5.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [shelljs](https://npm.io/package/shelljs.md) ^0.8.5
- [puppeteer](https://npm.io/package/puppeteer.md) ^14.1.2
- [pdf-merger-js](https://npm.io/package/pdf-merger-js.md) ^3.4.0

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 0.3.0 (latest) — 2023-07-22
- 0.2.1 — 2023-03-03
- 0.2.0 — 2022-06-01
- 0.1.1 — 2020-07-17
- 0.1.0 — 2020-05-11
- 0.0.2 — 2020-03-27
- 0.0.1 — 2018-06-03

## 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 <source.drawio> -o <dest.pdf>
drawio <source.drawio> -o <dest.png>
```

## 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 `<dest><#>.png`
- `split-pdf` All pages used, separate files with name `<dest><#>.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 `<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`

## Usage with Docker

```bash
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` and `cat-pdf`

---
_Source: https://npm.io/package/draw.io-export · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
