You can convert markdown files to pdf files with a package called markdown-pdf.
markdown-pdf
npx markdown-pdf filename.md
If you have a folder filled with markdown files. You can convert an entire folder with:
for i in *.md; do npx markdown-pdf "$i"; done