Convert Markdown files to pdf directly from GNOME files context menu
Go to file
2022-05-23 17:59:15 +02:00
.gitignore add alternatives 2021-09-13 20:52:32 +02:00
alternatives.sh add alternative 2021-09-15 17:34:14 +02:00
LICENSE add CC0 LICENSE 2022-05-23 17:57:41 +02:00
md-to-pdf Update 'md-to-pdf' 2022-01-13 12:49:18 +01:00
Nautilus-context-menu.png add screenshot and pdf example 2021-09-03 13:16:02 +02:00
README.md typo 2022-05-23 17:59:15 +02:00
README.md.pdf update README.md 2021-09-15 17:31:19 +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 the HTML file is modified so that large images fit on the PDF. Finally wkhtmltopdf converts HTML to pdf.

Alternatives conversion methods

See alternatives.sh.