Search code examples
pdfmarkdownpandocpdflatex

pdflatex not found on pandoc


im trying to convert a MarkDown file to pdf using pandoc. I have installed MikTex on my Windows PC but using the "code"

pandoc sample1.md -o sample1.pdf

pandoc responds:

pdflatex not found. Please select a different --pdf-engine or install pdflatex

I tried using the --pdf-engine=C:\Program Files\MiKTeX\pdftex and also the --pdf-engine=miktex command.

Thanks for your help!


Solution

  • If specifying a path, you must give the one to the pdflatex binary, not pdftex. Using --pdf-engine=C:\Program Files\MiKTeX\pdflatex should do the trick.