Forrest logo
back to the pandoc tool

pandoc:tldr:74aff

pandoc: Convert file to PDF (the output format is determined by file extension).
$ pandoc ${input-md} -o ${output-pdf}
try on your machine

This command is using the program pandoc to convert a Markdown file to a PDF file. Here's a breakdown of the command and its parts:

  • pandoc is the name of the program being executed.
  • ${input-md} is a placeholder for the input Markdown file. It implies that you need to replace ${input-md} with the actual file path and name of the Markdown file you want to convert. For example, if your Markdown file is named "document.md" and located in the current directory, you would replace ${input-md} with document.md.
  • -o is a flag used to specify the output file.
  • ${output-pdf} is a placeholder for the output PDF file. As with ${input-md}, you need to replace ${output-pdf} with the desired file path and name for the resulting PDF file. For example, if you want the PDF file to be named "output.pdf" and be saved in the current directory, you would replace ${output-pdf} with output.pdf.

Putting it all together, to convert a Markdown file named "document.md" to a PDF file named "output.pdf" in the current directory, the command would be: pandoc document.md -o output.pdf.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the pandoc tool