The device independent file format (DVI) is the output file format of the TeX typesetting program, designed by David R. Fuchs in 1979. Unlike the TeX markup files used to generate them, DVI files are not intended to be human-readable; they consist of binary data describing the visual layout of a document in a manner not reliant on any specific image format, display hardware or printer. DVI files are typically used as input to a second program (called a DVI driver) which translates DVI files to graphical data. For example, most TeX software packages include a program for previewing DVI files on a user's computer display; this program is a driver. Drivers are also used to convert from DVI to popular page description languages (e.g. PostScript, PDF) and for printing.

TeX markup may be at least partially reverse-engineered from DVI files, although this process is unlikely to produce high-level constructs identical to those present in the original markup, especially if the original markup used high-level TeX extensions (e.g. LaTeX).

DVI differs from PostScript and PDF in that it does not support any form of font embedding, instead merely referencing external font names. (Both PostScript and PDF formats can embed their fonts inside the documents.) For a DVI file to be printed or even properly previewed, the fonts it references must be already installed.

Also, like the PDF document format, DVI uses a limited sort of “programming” language (in the case of DVI, “a machine-like language”), It seems to be based on a TUGboat article of the same name from 1992, but which is much shorter. These documents do not specify the endianness, which is however big endian, as can be seen looking into a DVI file itself.

Specification

The DVI format was designed to be compact and easily machine-readable. Toward this end, a DVI file is a sequence of commands which form "a machine-like language", in Knuth's words.

DVI files are often converted into PDF, PostScript, or PCL format for reading and printing. They can be also viewed directly by using DVI viewers.

  • DVI viewers: YAP (included in MiKTeX), xdvi, windvi, Evince, KDVI, Okular, dviout, dviwin, DView (included in the commercial BaKoMa TeX distribution), javaDVI, MDVI, and DVIWindo (of the now defunct commercial Y&Y TeX, which has been open-sourced).
  • DVI to human-readable format: (disassembler of sorts)
  • DVI-to-PDF converters: , ,
  • DVI-to-PS converters: dvips is the de facto standard. CTAN includes some older ones like (and DVIPSONE) with a note that they lost their market share a long time ago.
  • DVI-to-bitmap converters: dvipng (generates GIF or PNG), or use dvips and Ghostscript
  • DVI-to-SVG converters: dvisvg, the only one included in CTAN and actively maintained is .

The first DVI previewers capable of on-screen previewing and modification of LaTeX documents ran on Amigas.

DVI-to-PDF converters

dvipdf is a tool to translate DVI files (generated by TeX) to PDF files. In current Linux distributions like Ubuntu, it is a thin wrapper around dvips and Ghostscript, and copyrighted by Artifex Software (the makers of Ghostscript). A possibly different program with the same name—described as a modified version of dvips—was announced in the late 1990s by Sergey Lesenko, however it was apparently never released.

dvipdfm is a DVI-to-PDF translator developed by Mark A. Wicks. The early documentation of dvipdfm specifically mentions the limited availability of Lesenko's dvipdf as a reason for creating dvipdfm. dvipdfm supports most of the newer special functions of the PDF format, including bookmarks, annotations, thumbnails, and dvips specials—a feature making possible the inclusion of Encapsulated PostScript (.eps) files like METAPOST output—as well inclusion of JPEG and PNG images; other features of dvipdfm include partial font embedding (reducing file size) and balancing the internal PDF document trees to speed up rendering of large documents.) are also present in pdfTeX, which typesets TeX directly to PDF. The 2004, 4th edition of the Guide to LaTeX compares them in the following way:

dvipdfmx is an extended version of the dvipdfm DVI-to-PDF translator, included in current TeX distributions like TeX Live 2014 and MiKTeX 2.9. The primary goal of the dvipdfmx project is to support multi-byte character encodings and CJK character sets for East Asian languages. dvipdfmx is also included (in a somewhat modified form) in XeTeX.