PDF exports does not contain mermaid charts


#1

Only found that HTML exports does contain drawings made with help of mermaid. Tried to download a PDF with proper drawing couple of times without success.


#2

Just realised that, mermaid charts are not exportable to other formats…


#3

Ugly dropin solution, export as HTML, open with Chromium or Firefox, print as PDF


#4

This is for Sponsored accounts only, there is a print button does same thing.


#5

I’ve tried that, but it also comes without the graph.


#6

Did you tried my solution:
For me exporting to HTML did render the mermaid blocks as expected.

  1. export as HTML
  2. open exported/downloaded HTML file with your browser
  3. for this HTML file opened with your browser, use “Print” --> “Save as PDF” from browser menu Youtube: How To

At least Chrome and Firefox let you do this – without any extra plugins – as this is built-in feature.
Optionally “Print as PDF” is built-in feature in most modern GNU/Linux distros as well (like Ubuntu).


Unfortunately neither one of “Export as PDF” did not work for me either (for mermaid), even though I have the sponsored account.

  • Export as PDF resulted the same as you described, which seems funny, as by mine understanding the app should first convert it to HTML (behind the scenes), and then convert this HTML version to the PDF for download. Might be some bug (PDF lacking handling for mermaid - older templating version)?

  • Export to PDF via PanDoc resulted with non styled codeblocks - at least data remained. As much as I understand, pandoc needs third-party filter (something like: https://github.com/raghur/mermaid-filter) on server side to handle this as expected. Note that several different filters exist for this, and I have no idea, which one should be picked (huge lack of time but also limited on skills).

It might be easiest and most reasonable to set up dedicated server on virtualbox install (easy cloning, full control and revisioning - though space consuming), and then test out the solutions.


I’ve also just noticed, stackedit seams to use much older version of mermaid, as it seams to have quite noticeble differences compared to what is featured in offical readme: https://github.com/mermaid-js/mermaid