Migrated to Cobalt's Gitlab
mdpdf is a simple CLI tool to convert commonmark files to PDF files. It leverages pulldown-cmark, syntect as well as ammonia and wkhtmltopdf to provide a complete experience. This includes syntax highlighting and extensions such as tables, taskslists, strikethrough or footnotes.
It features support footers with amongst other things license and name options that may help you when publishing PDFs frequently. It also features the option to use german or english translations for static texts such as a table of contents (WIP) and the footer.
Only linux is supported for building ATM though you may be able to cross compile for windows etc with e.g., WSL
The build process is at the moment only tested on debian. You will need to build wkhtmltopdf first. See their packaging repository (tested version: wkhtmltox_0.12.6-1) for instructions. It's required to have GNU bash installed though you may launch the make commands from another terminal emulator.
You will also need GNU Grep, GNU Coreutils (for stat), GNU make and npm.
The builds are at the moment not target at a specific architecture and will use the cargo default though in the future the builds will default compile for musl
to improve portability. I'm trying to not use platform specific libraries. When issues arise, or you are aware of any shortcomings don't hesitate to open an issue.
Change the default name by editing src/name.txt. Please use UTF-8 for this file
Just run: make build
To build a debian package run make deb
instead.
Build with make create-examples
. The example.md
will be built for each theme without -d
. All converted files as well as the source will be in examples/
.
This example is only partially functional due to broken taskslists
mdpdf is licensed under GPLv2.0 @ Cobalt https://cobalt.rocks. The same applies for all distributed binaries.
This uses bootstrap 5 for styling and may embed a part of their code in the binary. The license for bootstrap can be found here.