Today we had to deliver a .pdf file to a customer containing documentation about a system. The documentation was written in Markdown and needed to be converted to PDF. After some thoughts we did not find some straightforward way to do it, so we needed to convert Markdown to Asciidoctor using Pandoc first and then from Asciidoctor to PDF. In addition to that, we love Docker, so we used Docker containers to achieve that. The containers used:
We prepared quickly a small Bash script, which is the following (Listing of convertMdToPdf.sh):
|
|
This is it! Very simple and straightforward! I hope this article helps you and you will not devote much time to do the same. Have a nice day from a stormy Greece!