As someone who uses Pandoc with Docker, I’m somewhat interested in this tool, but I’m not sure if it’s right for me. A website where you can view sample PDFs created with markpdf might be helpful for people who are on the fence about trying it out.
I made a similar tool many years ago: GitHub - straight-shoota/md2pdf: Convert markdown files to pdf with flexible template and stylesheet · GitHub
It’s built on Crystal with markd as well, so I suppose it ticks most of the above features.
But I used wkhtmltopdf for rendering. So not the entire Chrome browser, but the webkit engine. I don’t think that exists anymore. It was perhaps a bit easier to just delegate layout and rendering to a single library.
On top, it also integrates Crinja for templating. Maybe that could be an inspiration for markpdf?
I am half decided to support short codes (which are a way to embed crinja templates) but honestly it was so much work getting it to this stage I am hesitant.
This command-line tool is handy, and I like the concept behind it. However, I’ve run into a few minor issues when trying to use it on macOS or when working with Japanese text, so I might submit a few pull requests in the future.
@ralsina is it possible to use it with a set of formatting rules, in my case for scientific / academic papers, when generating the PDF from a markdown?