.DVI

DVI File

TeX Device Independent File
Ask a question
QUICK ANSWER

A DVI file is the binary output of the TeX typesetting system - a device-independent description of a typeset document's page layout. On Windows open it with MiKTeX (includes the Yap viewer); on Linux use Evince or Okular; on macOS use Skim with MacTeX fonts. Modern LaTeX workflows produce PDF directly via pdfLaTeX, so DVI files mostly come from legacy compilation or the dvips toolchain.

Developer: David R. Fuchs (Stanford University, for Donald Knuth's TeX) Category: Text Files Open standard MIME: application/x-dvi
OPENS ON Windows macOS Linux
Related: .DOC · .ODT · .DOCX · .GDOC

On this page

19k+ extensions indexed
Last reviewed Jul 14, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the DVI file format?

A .dvi file is the binary typeset document produced by the TeX and LaTeX typesetting systems. The name stands for Device Independent, reflecting the design goal: the format precisely encodes every glyph position and rule on every page without committing to any specific output device - printer, screen, or typesetter.

DVI files are sequential opcode streams. The first byte is always 0xF7 (the pre preamble opcode) and the second byte is the format version: 0x02 for standard DVI or 0x03 for the Omega/Lambda extended variant with bidirectional text support. Page blocks bounded by bop and eop opcodes record absolute glyph positions, font selections, and box rules. A postamble follows containing the font table and page dimensions, and trailing 0xDF bytes pad the file to a four-byte boundary.

A critical characteristic: DVI files reference fonts by name and TFM checksum but do not embed them. The viewer or converter must have the referenced fonts available locally - typically through a TeX distribution. This differs from PDF, which embeds font subsets for self-contained rendering.

Modern TeX engines increasingly bypass .dvi entirely: pdfLaTeX and LuaLaTeX produce PDF directly; XeTeX emits an intermediate .xdv extended DVI file. The classic chain - .tex.dvidvips.ps → PDF - remains fully functional under TeX Live and MiKTeX. Plain TeX and standard LaTeX (non-PDF engines) continue to emit .dvi as their native output.

Security & safety

RISK: LOW

DVI files contain no embedded scripts or macros. The 'xxx' (special) commands embed driver-specific strings (e.g. PostScript specials via dvips) but these are interpreted only by the DVI driver, not executed as code. Low risk format used exclusively in academic and TeX contexts.

Format details

in a nutshell
FULL NAMETeX Device Independent Fileaka DVI, DeVice Independent
DEVELOPERDavid R. Fuchs (Stanford University, for Donald Knuth's TeX)since 1979 (with TeX; first described in TUGboat 1982)
CATEGORYText Files
MIME TYPEapplication/x-dvi
TYPEbinary typeset document (device-independent page layout)
STANDARDOpen · royalty-free
This extension is also used by…
  • Digital Video Interface (hardware connector) - DVI also refers to the display connector standard (DVI-D, DVI-I, DVI-A) - entirely unrelated; hardware, not a file format.
MAGIC BYTES · FILE SIGNATURE
OFFSET
0001
HEX
F702
ASCII
··
First byte is always 0xF7 (decimal 247, the 'pre' opcode). Second byte is the DVI format version: 0x02 for standard DVI, 0x03 for Omega/Lambda extended DVI. File ends with 4-7 bytes of 0xDF (decimal 223) to pad total length to multiple of 4.

Programs that open DVI files

Windows2 apps
MiKTeX (includes Yap viewer) Open-source Install MiKTeX; Yap (Yet Another Previewer) opens .dvi files from the Start menu or by double-clicking.
TeX Live (includes dvisvgm, dvipdfm) Open-source Install TeX Live for Windows; use 'dvisvgm foo.dvi' or 'dvipdfm foo.dvi' to convert to SVG/PDF.
macOS2 apps
Skim Open-source Skim can open DVI files (requires MacTeX/TeX Live fonts). Good for SyncTeX source-preview sync.
MacTeX (includes dvi tools) Open-source Install MacTeX; use TeXShop's built-in DVI viewer or 'dvipdfm foo.dvi' in Terminal.
Linux3 apps
Evince Open-source Double-click the .dvi file in GNOME; Evince opens DVI natively. Requires TeX fonts installed.
Okular (KDE) Open-source Open the .dvi file in Okular (KDE document viewer). DVI support built in with TeX Live fonts.
TeX Live / dvips / dvipdfm Open-source Command line: 'dvips foo.dvi -o foo.ps' then 'ps2pdf foo.ps'; or 'dvipdfm foo.dvi' for direct PDF.

Technical details

deep spec
EncodingBinary opcode stream; multi-byte integers are big-endian
Magic bytes0xF7 at offset 0 (pre preamble opcode); 0x02 at offset 1 for standard DVI format version
Format variantsVersion byte 0x02 = standard DVI; 0x03 = Omega/Lambda extended DVI (RTL/LTR bidirectional); XDV = XeTeX extension
File structurePreamble → page blocks (bop/eop opcodes) → postamble (font table, page count, dimensions) → 0xDF padding bytes
Font handlingFonts referenced by name and TFM checksum; not embedded - viewer requires local font installation
Font checksumTFM checksum embedded per font definition record; mismatch triggers a viewer warning
File terminationTrailing 0xDF bytes pad total file length to a multiple of 4 bytes
Typical file size10 KB - 5 MB (academic paper to full book)
Coordinate systemDimensions in DVI units (1 DVI unit = 100 nm at default 1000-unit magnification); absolute page positioning
Associated OSLinux, Windows, macOS, Unix (cross-platform via TeX Live, MiKTeX, MacTeX)
Post-processing chaindvips converts to PostScript; dvipdfm/dvipdfmx converts to PDF; dvisvgm converts to SVG
Byte orderBig-endian for all multi-byte integers within DVI opcodes
Released1979 (with TeX; first described in TUGboat 1982)
Latest versionDVI format 2 (standard); format 3 = DVItype with mixed RTL/LTR (Omega/Lambda); XDV = extended DVI used by XeTeX
Open standardYes · royalty-free
Specificationwww.mn.uio.no

DVI conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with DVI files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about DVI files.

Frequently asked questions

What is a DVI file?
The binary output of the TeX typesetting system - a device-independent description of a typeset document's layout. Produced by 'latex foo.tex' (without pdfLaTeX).
How do I open a DVI file on Windows?
Install MiKTeX - it includes Yap (Yet Another Previewer) which opens .dvi files directly. Alternatively install TeX Live for Windows.
How do I convert DVI to PDF?
Run 'dvipdfm foo.dvi' or 'dvipdfmx foo.dvi' from your TeX installation. Both are included in MiKTeX and TeX Live.
Why does my DVI viewer show blank or wrong characters?
The viewer cannot find the TeX fonts referenced in the DVI file. Install the full TeX Live or MiKTeX distribution to get the font packages, or run 'updmap' to rebuild the font map.
Should I use DVI or PDF for LaTeX output?
Use pdfLaTeX (produces PDF directly) for almost all modern workflows. DVI is mainly relevant for legacy documents, when using dvips for complex PostScript specials, or when your publisher specifically requires the DVI→PS chain.
Can DVI files contain images or color?
Images and color are supported via 'special' commands interpreted by the DVI driver (dvips, dvipdfm), but they are not embedded in the DVI itself - the driver looks them up at conversion time.

References

1Wikipedia - Device independent file formaten.wikipedia.org
2DVI format specification (Fuchs/Knuth)www.mn.uio.no

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.MDMarkdown Document
4.BINCD/DVD Disc Image (BIN/CUE)
5.NOMEDIAAndroid No-Media Marker File
6.PARTPartial Download File
7.RPMSGRestricted Permission Message
8.EXEWindows Executable (Portable Executable)
9.AVIFAV1 Image File Format (AVIF)
10.DBSQLite Database File

Related extensions

.DOCMicrosoft Word 97-2003 Document
.ODTOpenDocument Text
.DOCXMicrosoft Word Open XML Document
.GDOCGoogle Docs Shortcut (Link to a Google Docs document)
.LSTList File (generic plain-text list / listing)
.VNTvNote (mobile phone text note / memo)

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z