Convert Markdown files to pdf directly from GNOME files context menu
Go to file
2021-09-15 17:16:04 +02:00
.gitignore add alternatives 2021-09-13 20:52:32 +02:00
alternatives.sh use wkhtmltopdf instead of chromium 2021-09-15 17:14:44 +02:00
md-to-pdf formatting 2021-09-15 17:16:04 +02:00
Nautilus-context-menu.png add screenshot and pdf example 2021-09-03 13:16:02 +02:00
README.md add alternatives 2021-09-13 20:52:32 +02:00
README.md.pdf add alternatives 2021-09-13 20:52:32 +02:00

md-to-pdf

To be able to convert one or more Markdown (.md) files to pdf, save md-to-pdf in "$HOME"/.local/share/nautilus/scripts/md-to-pdf and make it executable.

Screenshot of the context menu in Nautilus (GNOME files):

As an example, one can have a look at this README file converted to pdf: README.md.pdf

The conversion process

At first the Markdown is converted to HTML with cmark-gfm. Then chromium is used to print the HTML to pdf.

Alternatives conversion methods

see alternatives.sh