pdflatex producing dvi output instead of pdf

In you tex file, you have put %&latex

%&latex
\documentclass[12pt,letterpaper]{article}

If you give %&latex this will produce dvi only. Just remove this line or put %&pdflatex.


If you do not want to modify the source file, another possibility could be to use the option -output-format=dvi when compiling with pdflatex. It works for me with TeX Live under Windows. Remember to place the option before input file name.

Just as an example, to produce a dvi output I use the following compile command:

C:\texlive\2015\bin\win32\pdflatex.exe -output-format=dvi "my_source_file.tex"

Tags:

Pdf

Pdftex