Package pdftex.def Error: PDF mode expected, but DVI mode detected!_ mdpi_ Templatex compilation error in winedt

Use LaTeX to compile the following file types as follows:

\documentclass[journal,article,pdftex,10pt,a4paper]{IEEEtran}

Error as shown in the title appears:

Package pdftex.def Error: PDF mode expected, but DVI mode detected!(pdftex.def) If you are using `latex', then call `pdflatex'. }\@ehc

It is probably because of the difference between the compilation of latex and pdflatex. Using the mode of latex, the latter cannot be compiled.

The option pdftex is for use with pdfLaTeX. If eps figure are used, remove the option pdftex and use LaTeX and dvi2pdf.

In other words, eps(embedded PostScript) image documents should be used with latex mode, while pdftex will cause problems (the solution is to try to delete pdftex).
In addition, the same problem will occur when I see my net friends in the following usage:

\usepackage[pdftex]{graphicx}

The solution is to remove the [pdftex], the graphicx package will compile normally, but in the pdftex mode, it is better to convert the . Eps file into the . PDF file.
If you use commands such as \includegraphics{file} to load the display image file, the two modes mentioned above will automatically complete the extension of the filefile, and latex mode will be supplemented with file.eps. While pdftex will be completed as file.pdf (or file.png, file.jpg).

Read More: