[Tex/LaTex] Latex or PdfLatex to generate DVI

compilingdvigraphicspdftex

I would like to generate DVI output using latex or pdflatex, it doesn't matter. First, I would like to mention that I run the following command to compile my document and it runs successfully –

pdflatex -shell-escape -synctex=1 report.tex

Now if I wanted to have a DVI on the same file, I run the following command –

latex report.tex

I get the following error –

! LaTeX Error: Cannot determine size of graphic in platform.pdf (no BoundingBox
).

Just to mention that the figure platform.pdf is in pdf format which is generated using other image editing software (Microsoft Visio).

I also tried to add %&latex on the first line.

How should I solve this problem?

Best Answer

latex.exe cannot compile a TeX input file that imports either PDF, PNG, or JPG images. Instead, latex.exe can only compile a TeX input file that imports EPS images.

See the Ulrike Fischer's answer or Martin Schroder's comment for the correct statement.

To convert PDF to EPS, you can use pdftops as follows:

 pdftops -f 1 -l 1 -eps "input.pdf"  "output.eps"