dvipng is a cross-platform program for converting the DVI output of the TeX typesetting system into PNG image format. Dvipng was written by Jan-Åke Larsson.
The traditional TeX82 outputs device independent (DVI) files, which as the name implies, are intended to be independent of the output device, but do not embed the actual fonts. As such, DVI files are not suitable for use by web browsers, and a conversion program is needed to translate from a DVI file to an image. Dvipng renders the font glyphs into the images, for example using FreeType when available.
Although it is possible to generate web graphics using other DVI backends such as dvips followed by a PostScript-to-image converter like ImageMagick, using dvipng requires fewer programs to be run. Dvipng is used as the default rendering method for MediaWiki software, as of version 1.8.0. It is also included in the TeXLive distribution and several Linux distributions.
Dvipng is released under the GNU LGPL.
Basic usage of dvipng
To use dvipng at its simplest, simply type dvipng foo where foo.dvi is the output of TEX that you want to convert to PNG format. If there are four pages in foo.dvi, those pages will be output as foo1.png, foo2.png, foo3.png, and foo4.png, respectively. If you have enabled the PostScript font support (via FreeType), fonts will be rendered as they are needed. Otherwise, dvipng will use bitmapped (PK) fonts, and if you use PK fonts that have not been used on your system before, they may be automatically generated; this process can take a few minutes, so progress reports appear by default. The next time the same font is used, it will have been saved on disk, so rendering will go much faster. (If dvipng tries to endlessly generate the same fonts over and over again, something is wrong. See Section “Unable to generate fonts” in Kpathsea.) Many options are available (see the next section). For a brief summary of available options, just type dvipng --help.