# pdflatex producing dvi output instead of pdf

I have a template for a paper that I am using that produces dvi output when I run `pdflatex` on the input file. Whereas most of the papers that I have worked with produce pdf output when I run `pdflatex`.

I was looking at the log files for the two different papers and the one that produces dvi output includes the line:

``````(/etc/texmf/tex/latex/config/graphics.cfg
File: graphics.cfg 2009/08/28 v1.8 graphics configuration of TeX Live
)
Package graphics Info: Driver file: dvips.def on input line 91.
``````

Whereas the one that produces pdf output contains the lines:

``````(/etc/texmf/tex/latex/config/graphics.cfg
File: graphics.cfg 2009/08/28 v1.8 graphics configuration of TeX Live
)
Package graphics Info: Driver file: pdftex.def on input line 91.
``````

I am trying to figure out what the setting in that would cause this difference. The packages that are included for the two different papers are very similar, but I'm guessing it's related to one of them. So basically I want to figure out how to make pdflatex produce pdf output, and I'm wondering if the different driver file gives a hint as to what I should be looking at.

-
Can you post the template? It would be much easier to help you if you give us the information. – Boris Apr 27 '12 at 19:55
The template that I am using that is giving me problems is available here: microarch.org/micro44/files/micro2011AuthorKit.zip – Gabriel Southern Apr 27 '12 at 19:57
You probably have left the first line in the template, which is `%&latex`. Remove it. Or launch `pdflatex -no-parse-first-line` – egreg Apr 27 '12 at 20:16
thanks that solved my problem. – Gabriel Southern Apr 27 '12 at 21:23

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"
``````
-