mermaid-filter
mermaid-filter copied to clipboard
Support SVG->EPS conversion
Would be nice, if mermaid-filter supported generating EPS files.
- mermaid can output SVG (although some diagram types are not rendered correctly)
- Inkscape could be used for converting the SVG files to EPS files
- EPS files can be used by PanDoc for generating PDF output with diagrams included
I tried and it works, put something like
var epsPath = path.join(outdir, `${prefix}-${counter}.eps`);
...
exec(`inkscape --export-eps=${epsPath} ${newPath}`);
before the function return
You can probably do it better.
Thanks for the suggestion - however, I don't use EPS at all and know little about it.. would you be willing to send a PR?
pandoc can convert mermaidjs svg output to pdf using rsvg2pdf.