Preview markdown in HTML then print to PDF.

Install grip (based on Flask):

$ pip install grip

Open your markdown file in the browser:

$ grip markdown_file.md

This runs a web server and it gives you the localhost link to open.

* Serving Flask app "grip.app" (lazy loading)
* Environment: production
  WARNING: This is a development server. Do not use it in a production deployment.
  Use a production WSGI server instead.
* Debug mode: off
* Running on http://localhost:6419/ (Press CTRL+C to quit)

Updates in your markdown file are refreshed. Preview in the browser and print PDF from there.

References: