Linux Commands Examples

A great documentation place for Linux commands


produce PDF files directly from DVI files

see also : dvipdft - tex - dvips - groff - grodvi - pic - extractbb


dvipdfm [options] file[.dvi]

add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!


latex eigen.tex
dvipdfm eigen.dvi
latex Mayur_CV.tex
dvipdfm Mayur_CV.dvi
latex Mayur_CV.tex
dvipdfm Mayur_CV.dvi
latex test_tuftebook
dvipdfm test_tuftebook
evince test_tuftebook.pdf
latex thesis1
latex thesis1
dvipdfm thesis1.dvi
platex textest.tex;dvipdfm textest.dvi;acroread textest.pdf&


In TeX Live, dvipdfm is another incarnation of dvipdfmx rather than a separate program. Compatibility is attempted as best as possible. (The change was made due to duplicated security and configuration issues arising repeatedly.) Please report problems with this dvipdfm to the dvipdfmx maintainers at dvipdfmx (at)

The program dvipdfm generates a PDF file from a DVI file. DVI files are the output format produced by TeX. Output from groff can be converted to DVI format using grodvi.

The program dvipdfm recognizes several commonly used \special commands, which are extensions to the DVI format. Specifically, it understands color specials, papersize specials, tpic specials (which allow it to be used with pic), hypertex specials, and some PostScript specials. These extensions allow documents to contain color, figures, and hyperlinks. The program tries to mimic the behavior of dvips so that many macro packages produced for use with dvips will work with dvipdfm. Dvipdfm understands its own specific \special commands to allow access to PDF features such as annotations and bookmarks.

For issues related to bounding boxes (and hence image sizes), please see extractbb(1).



Ignore color \specials. The -c toggles a flag that disables color \special processing. Unless changed in the configuration file, that flag is off, and color \specials are interpreted normally. The -c option may be used to produce a black and white document from a document containing color TeX \special commands.


Remove thumbnail images after including them. (See the -t option for more information.)


Toggle partial font embedding flag. If partial font embedding is off, embedded fonts are fully embedded. The default, if not changed in the configuration file, is to embed only those glyphs actually used in the document.

-f map_file

Set the name of the font map file to map_file. The format of the font map file is documented in the Dvipdfm User’s Manual.


Select landscape mode. In other words, exchange the x and y dimensions of the paper.

-m mag

Magnify the input document by mag.

-o name

Generate PDF output file having the name name. By default, the name of the output file is file.pdf.

-p paper

Select the papersize by name (e.g., letter, legal, ledger, tabloid, a3, a4, or a5 )

-r size

Set resolution of bitmapped fonts to size dots per inch. Bitmapped fonts are generated by the Kpathsea library, which uses Metafont. Bitmapped fonts are included as type 3 fonts in the PDF output file.

-s page_specifications

Select the pages of the DVI file to be converted. The page_specifications consists of a comma separated list of page_ranges:

page_specifications := page_specification[,page_specifications]


page_specification := single_page|page_range

page_range := [first_page]-[last_page]

An empty first_page is implied to be the first page of the DVI file. An empty last_page is treated as the last page of the DVI file.

-s 1,3,5

includes pages 1, 3, and 5;

-s -

includes all pages;

-s -,-

includes two copies of all pages in the DVI file; and

-s 1-10

includes the first ten pages of the DVI file.


Search for thumbnail images of each page in the directory named by the TMPDIR environment variable. The thumbnail images must be named in a specific format. They must have the same base name as the DVI file and they must have the page number as the extension to the file name. Dvipdfm does not generate the thumbnails itself, but it is distributed with a wrapper program named dvipdft that does so.


Increase verbosity. Results of the -v option are cumulative (e.g., -vv ) increases the verbosity by two increments.

-x x_offset

Set the left margin to x_offset. The default left margin is 1.0in. The dimension may be specified in any units understood by TeX (e.g., bpt, pt, in, cm )

-y y_offset

Set the top margin to y_offset. The default top margin is 1.0in. The dimension may be specified in any units understood by TeX (e.g., bpt, pt, in, cm )

-z compression_level

Set the compression level to compression_level. Compressions levels range from 0 (no compression) to 9 (maximum compression) and correspond to the values understood by zlib.


Dvipdfm uses the kpathsea library for locating the files that it opens. Hence, the environment variables documented in the Kpathsea library documentation influence dvipdfm.

Dvipdfm also reads the following environment variables:


The directory to search for thumbnail images of each page.


The precise location of the following files is determined by the Kpathsea library configuration. The location may be determined by using kpsewhich, e.g.,
kpsewhich -progname=dvipdfm -format=’other text files’ config


Startup options

The default font map file (this name may be changed in the config file).


TeX font metrics


TeX virtual font files


PostScript Type 1 font files


The Kpathsea library configuration file. The location of this file may be found by typing
kpsewhich texmf.cnf

image bounding boxes

When including images with dvipdfm, their bounding boxes should be generated by running ebb, or extractbb -m. The result will be in an .bb file.

When including images with dvipdfmx, their bounding boxes should be generated by running extractbb. The result will be in an .xbb file; the xbb information is the same as for the PDF format.

see also

dvipdft , tex , dvips , groff , grodvi , pic , extractbb , and the Kpathsea library info documentation.


Mark A. Wicks. But for the version in TeX Live, all bugs and other reports should go to the dvipdfmx maintainers at dvipdfmx (at)

How can this site be more helpful to YOU ?

give  feedback