Simple script to help render markdown documents as pdf.
Takes Markdown files, with or without Mermaid syntax, converts to HTML using Pandoc and then converts to PDF using Weasyprint. Works fine in Mac, Linux and WSL.
Make sure pandoc, weasyprint and mermaid-filter are installed, according to the their instructions.
CD into de directory where your MDs are, and:
./md2pdf.sh
You may want to have VSCode working with Markdown and Mermaid, by adding these extensions:
Extension | Description | Publisher |
---|---|---|
Markdown Preview Mermaid Support | Adds Mermaid diagram and flowchart support to VS Code's builtin markdown preview | Matt Bierner |
Markdown All in One | All you need to write Markdown (keyboard shortcuts, table of contents, auto preview and more) | Yu Zhang |
markdownlint | Markdown linting and style checking for Visual Studio Code | David Anson |