The command-line utility dvisvgm is a tool for TEX/LaTEX users. It converts DVI, EPS, and PDF files to the XML-based vector graphics format SVG. In contrast to bitmap graphics, vector graphics are arbitrarily scalable without loss of quality. All modern web browsers support a large amount of the current SVG standard 1.1. Furthermore, SVG files can also be displayed with the Java-based Squiggle SVG browser which is part of the Apache Batik project, and the free vector graphics editor Inkscape.
The image on the right shows a screen shot of Inkscape with a couple of SVG files opened that have previously been converted by dvisvgm. To get a better impression of the actual conversion results, have a look at the collection of SVG examples shown on a separate page.
- Supports classic DVI files (format version 2), pTEX DVI files in vertical mode (version 3), and XDV files as generated by XeTeX (versions 5, 6, and 7).
- Complete font support including virtual fonts, evaluation of font encodings, CMap files, sub-font definitions and font maps.
- Glyph outlines of all required fonts are embedded into the generated SVG files.
- The font data can be embedded in SVG, TrueType, WOFF, or WOFF2 format.
- Glyph outlines of fonts that are not available in a vector format are generated on-the-fly by vectorizing METAFONT’s bitmap output.
- dvisvgm allows to replace font elements by paths so that applications without SVG font support are enabled to render dvisvgm’s output properly.
- Computes tight bounding boxes for the generated graphics, but supports common paper formats and arbitrary user-defined sizes as well.
- Intersections of clipping paths can be computed directly in order to increase the compatibility of the generated SVG files.
- Approximates PostScript color gradient fills not directly supported by SVG 1.1.
- Optionally creates compressed SVGZ files.
- Provides options for applying page transformations, like translation, rotation, scaling, and skewing.
- Evaluates color, emTEX, tpic, hyperref/HyperTEX, papersize, PDF mapfile, and PostScript specials.
- Evaluates bounding box data created by the preview package and provides information about width, height, and depth of the generated SVG files. Especially, the depth value can be used to vertically align the SVG graphics with the baseline of surrounding text in HTML or XSL-FO documents, for example.
- The converter was successfully tested on various Linux (TEX Live) and Windows (MiKTEX, W32TEX) systems.
- dvisvgm has been added to TEX Live, W32TEX, MiKTEX, and MacPorts. Therefore, it’s available for a wide range of platforms and operating systems.
- See the manual page for a complete list of command-line options.