Markdown (md/txt) file to PDF conversion (in Ubuntu 22.04)

less than 1 minute read

If you are writing in markdown, at times you may want to convert those into PDF file. Here are few steps you need:

  • Download few dependencies (if not present in your system):
    • sudo apt-get install pandoc texlive-latex-base texlive-fonts-recommended texlive-extra-utils texlive-latex-extra
  • Now convert using:
    • pandoc my-markdown-file.md -o my-markdown-file.pdf
    • pandoc my-markdown-file.txt -o my-markdown-file.pdf