Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
2  
DVI can neither handle the PDF format, nor many graphics format allowed by pdflatex –  Lionel MANSUY Feb 18 '13 at 10:21
1  
actually, I need to submit the DVI to the conference instead of PDF. I am wondering how should I generate DVI. –  Raj Feb 18 '13 at 10:23
    
@MartinSchröder: That link explains why Raj faced that problem, but since the error message suggests there's a particular problem with this PDF message, rather than the program not handling PDF at all, the equivalence of the two problems isn't clear. I'd rather have this not be a duplicate. –  Charles Stewart Feb 18 '13 at 11:02
1  
if you have a conference that specifies DVI, it might be a good idea to get one of the "great and good" to point out to them that it's not a good idea. this issue with image formats is only one of the many that can arise for a scholar trying to prepare a paper for such a conference. –  wasteofspace Feb 18 '13 at 19:06
    
Well, its exactly the PDF eXpress tool of IEEE which needs this. The latex source must have DVI included is their requirement. You can have a look here http://www.pdf-express.org/ –  Raj Feb 19 '13 at 9:01
add comment

3 Answers 3

up vote 3 down vote accepted

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"
share|improve this answer
    
I tried this convert utility already. It is losing the image quality to a great extent. Any suggestion on that? –  Raj Feb 18 '13 at 10:35
2  
Rather than convert, I'd suggest pdf2ps that uses Ghostscript. But probably PDF was not the best format to begin with, if the contents is an image. –  egreg Feb 18 '13 at 10:37
    
I used inkscape and got great results. Thanks a lot ! –  Raj Feb 18 '13 at 10:43
1  
@Raj: See my update. You will get a high quality EPS. –  Please don't touch Feb 18 '13 at 10:58
    
@egreg: I think pdf2ps does not exist. –  Please don't touch Feb 18 '13 at 11:01
show 2 more comments

Actually LaTeX itself can handle every image format if you tell it the size of the graphics:

\documentclass[]{scrreprt}
\usepackage{graphicx} 

\begin{document} 
\fbox{\includegraphics[bb=0 0 200 200]{unknown.imgformat}}

\end{document}

The dvi doesn't contain the actual image but only a reference, a "link". So it doesn't matter that it doesn't exist. The problems start when you try to view, print or convert to pdf: Then the dvi driver needs to find the image and also must be able to handle it.

Btw: This also means that it is not enough to send a dvi to someone else. You should also sent every image.

The most used dvi driver, dvips can handle eps and in some variants jpg. With dvipdfmx it is also possible to use e.g. pdf:

\documentclass[]{scrreprt}
\usepackage[dvipdfm]{graphicx}

\begin{document} 
\fbox{\includegraphics[scale=0.5,bb=0 0 600 850]{tiger.pdf}}

\end{document}
share|improve this answer
1  
See also Heiko’s answer: Graphics file extensions and their order of inclusion when not specified. –  Speravir Feb 18 '13 at 23:06
add comment

According to this link, you have to convert the PDF to PS or EPS format.

You may use The Gimp to make the conversion.

share|improve this answer
    
PDF to EPS degrades image quality a lot. Do you know any good method for conversion, to not to loose the image quality? –  Raj Feb 18 '13 at 10:31
1  
You may play with the resolution; PDF to EPS seems to loose the vector format as you convert the PDF to a raster format. Try using a "big" resolution (like 300, 600 or 1200 dpi). –  Lionel MANSUY Feb 18 '13 at 10:39
    
I used inkscape and got great results. Thanks a lot ! –  Raj Feb 18 '13 at 10:46
    
Converting your PDF to PostScript is only needed if you use dvips or another device driver that does not handle PDFs. But there's still dvipdfm, which can handle PDFs. –  Martin Schröder Feb 19 '13 at 10:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.