md-to-pdf/README.md

19 lines
661 B
Markdown
Raw Permalink Normal View History

2021-09-03 13:10:03 +02:00
# md-to-pdf
To be able to convert one or more Markdown (`.md`) files to pdf, save [md-to-pdf](md-to-pdf) in `"$HOME"/.local/share/nautilus/scripts/md-to-pdf` and make it executable.
2021-09-03 13:16:02 +02:00
Screenshot of the context menu in Nautilus (GNOME files):
![](./Nautilus-context-menu.png)
As an example, one can have a look at this README file converted to pdf: [README.md.pdf](./README.md.pdf)
2021-09-13 20:52:32 +02:00
## The conversion process
2021-09-15 17:31:19 +02:00
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.
2021-09-13 20:52:32 +02:00
## Alternatives conversion methods
2022-05-23 17:59:15 +02:00
See [alternatives.sh](alternatives.sh).