21

I am converting a dvi file to a pdf, but in that process my figures are misplaced. I used \FloatBarrier command to fix the figures in dvi, but facing the same problems in pdf. Can any one help?

peterh
  • 331
user42754
  • 281
  • 1
    Try to convert to ps first. – Sigur Dec 16 '13 at 13:20
  • 4
    Exactly how are you coing from dvi to pdf? I know of at least two methods, so more detals would be helpful. And why don't you just work exclusively in PDF? – daleif Dec 16 '13 at 13:28
  • 1
    You need to take care that the paper format is not changed in conversion. E.g. if you use A4 paper size. The default is letter and in the conversion dvi->ps->pdf this might get mixed. See here for details: http://tex.stackexchange.com/questions/21769/margin-changes-in-converting-dvi-to-pdf?rq=1 – Martin H Dec 16 '13 at 13:30
  • What is your OS? On linux, you could try dvips your_file.dvi and then ps2pdf your_file.ps in the terminal. – ppr Dec 16 '13 at 16:24
  • 1
    The pagination shouldn't be changing when converting from .dvi to .pdf --- the problem instead should be that the figures are showing up in the wrong place, which is a different problem. See this: http://tex.stackexchange.com/questions/2275/keeping-tables-figures-close-to-where-they-are-mentioned – WillAdams Dec 16 '13 at 16:58
  • @ sigur i did that too but problem persists. – user42754 Dec 17 '13 at 04:34
  • @dalief i am generating dvi first in latex and then simply click on dvi to pdf. and all my figures are in eps format which do not work in pdf. – user42754 Dec 17 '13 at 04:35
  • @Martin thanks a lot. my problem is removed – user42754 Dec 17 '13 at 05:16
  • @thanks all for the prompt response. it gives me a clear understanding. – user42754 Dec 17 '13 at 05:43

1 Answers1

35

There's a utility called dvipdfm that can do this. It probably came with your TeX distribution. Try this at the command line:

dvipdfm myfile.dvi

This should create a file called myfile.pdf. If you run into trouble, the documentation can be found in http://gaspra.kettering.edu/dvipdfm/.

Speravir
  • 19,491
Joe Mornin
  • 695
  • 6
  • 11
  • 2
    The documentation can also be found within the TeX distributions. And I would prefer dvipdfmx. Not to forget the way DVI —> PS —> PDF with first dvips and then ps2pdf. – Speravir Mar 15 '14 at 02:18