Python command line application to convert Markdown to PDF.
There are several projects that can be considered if you need something with more features. Of note:
$ pip install mdpdf
$ mdpdf [OPTIONS] [INPUTS]...
-o, --output FILE
Destination for file output. [required]-h, --header <template>
Sets the header template.-f, --footer <template>
Footer template.-t, --title TEXT
PDF title.-s, --subject TEXT
PDF subject.-a, --author TEXT
PDF author.-k, --keywords TEXT
PDF keywords.-p, --paper [letter|A4]
Paper size (default letter).--version
Show the version and exit.--help
Show this message and exit.The <template>
is a quoted, comma-
delimited string, containing the left, centre,
and right, fields for the header/footer. Format is "[left],[middle],[right]"
.
Possible values to put here are:
{page}
current page number{header}
current top-level body text heading{date}
current dateExample:
$ mdpdf -o article.pdf article.md
$ mdpdf -o article.pdf --footer "{date},{heading},{page}" article.md