2

I'm trying to call pdftex.exe from the command-line with a simple document that looks as follows

\documentclass{article}
\begin{document}
test
\end{document}

But instead of my PDF I get the following output

This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9)
entering extended mode
(c:/temp/1884874639.tex
! Undefined control sequence.
l.1 \documentclass
                  {article}
?
! Emergency stop.
l.1 \documentclass
                  {article}
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on c:/temp/1884874639.log.

Is there some command-line switch that I'm missing? My invocation is pdftex.exe -output-directory="c:\temp" 123.tex.

1 Answers1

7

Try

% this file name is filename.tex
hello world
\bye

with pdftex filename.tex

Or try

% this file name is filename.tex
\documentclass{article}
\begin{document}
hello world
\end{document}

with pdflatex filename.tex