mermaid-filter icon indicating copy to clipboard operation
mermaid-filter copied to clipboard

Support SVG->EPS conversion

Open priiduonu opened this issue 8 years ago • 2 comments

Would be nice, if mermaid-filter supported generating EPS files.

  1. mermaid can output SVG (although some diagram types are not rendered correctly)
  2. Inkscape could be used for converting the SVG files to EPS files
  3. 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.

priiduonu avatar Dec 13 '16 22:12 priiduonu

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?

raghur avatar Mar 13 '17 09:03 raghur

pandoc can convert mermaidjs svg output to pdf using rsvg2pdf.

tewarid avatar Jul 04 '18 01:07 tewarid