dvipdfmx, xdvipdfmx, dvipdfm â produce PDF files directly from DVI files đ¯
| Use Case | Command | Description |
|---|---|---|
| Convert DVI to PDF | dvipdfmx file.dvi | đ Basic conversion, output file.pdf |
| Specify output filename | dvipdfmx -o output.pdf file.dvi | đ Custom output name |
| Select specific pages | dvipdfmx -s 1-5 file.dvi | đ Pages 1â5 only |
| Landscape mode | dvipdfmx -l file.dvi | đ Swap x/y dimensions |
| Set paper size | dvipdfmx -p a4 file.dvi | đ Choose paper (letter, a4, âĻ) |
| Magnify document | dvipdfmx -m 1000 file.dvi | đ Apply magnification factor |
| Quiet mode | dvipdfmx -q file.dvi | đ Suppress messages |
| Increase verbosity | dvipdfmx -vv file.dvi | đĸ Debug output (max 4 levels) |
| Compression level | dvipdfmx -z 9 file.dvi | đī¸ Set zlib compression (0â9) |
| Use dvipdfm compatibility | dvipdfmx --dvipdfm file.dvi | đ Emulate dvipdfm behavior |
dvipdfmx or dvipdfm [options] file[.dvi]
The program dvipdfmx generates a PDF file from a DVI file. DVI files are the output produced by TeX. groff can also generate DVI files using grodvi (-Tdvi).
In TeX Live, dvipdfm is another incarnation of dvipdfmx rather than a separate program. Compatibility is attempted as best as possible.
xdvipdfmx is another incarnation. It is used as the back end for xetex(1) and is not intended to be invoked directly.
dvipdfmx 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 where possible, so that many macro packages produced for use with dvips will also work with dvipdfmx. In addition, dvipdfmx understands its own specific \special commands to allow access to PDF features such as annotations and bookmarks.
As of December 2018, one such special specific to dvipdfmx is pdf:trailerid, which specifies the /ID in the PDF trailer. It is used like this (from the TeX level):
\special{pdf:trailerid [ (0123456789abcdef) (01234567890abcdef) ]}
That is, the special takes an array (the square brackets) of two 16-byte PDF strings (the parentheses). This is the same syntax as LuaTeX's \pdfvariable trailerid, while different from pdfTeX's \pdftrailerid. It must appear on the first output page, otherwise it is ignored.
Unrecognized specials will generate warning messages. Packages that may need a dvipdfm or dvipdfmx driver option include geometry, hyperref, bookmark, graphicx, and xcolor.
For issues related to bounding boxes (and hence image sizes), see extractbb(1).
Unlike with many other programs, argument values must be separated from option names by a space, not an = sign; option names cannot be abbreviated; and - and -- cannot be used interchangeably.
Ignore (or accept) color \specials. By default, color \specials are interpreted normally (changeable in the configuration file). The -c option may be used to produce a black and white document from a document containing color TeX \special commands. đ¨
Enable dvipdfm emulation mode. This is the default if the executable name is 'dvipdfm'. đ
Specify the number of decimal digits in the PDF output; must be between 0 and 5, default is 2. đĸ
Ignored, for (semi-)compatibility with dvipdfm. đĢ
Read the font map file given by map_file. The default map file in TeX Live is pdftex.map, as defined in the configuration file. đ
Show a help message and exit successfully. â
Read cfgfile as another include file, after reading the default dvipdfmx.cfg. đ
Select landscape mode. In other words, exchange the x and y dimensions of the paper. đ
Magnify the input document by mag. đ
Set the PDF output file name; use '-' for stdout. By default, the name of the output file is derived from the input, that is, file.pdf. đ
Select the papersize by name (e.g., letter, legal, ledger, tabloid, a3, a4, or a5). đ
Quiet mode. đ
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. Default is 600. đŧī¸
Select the pages of the DVI file to be processed; default is '-', meaning all pages. The page_specifications consists of a comma separated list of page_ranges:
page_specifications := page_specification[,page_specifications]
where
page_specification := single_page|page_range
page_range := [first_page]-[last_page]
An empty first_page is treated as the first page of the DVI file, and an empty last_page is treated as the last page of the DVI file.
Examples:
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: the same base name as the DVI file and the page number as the extension to the file name. dvipdfmx does not generate such thumbnails itself, but it is distributed with a wrapper program named dvipdft that does so. đŧī¸
Show a help message and exit successfully. âšī¸
Increase verbosity. Results of the -v option are cumulative (e.g., -vv increases the verbosity by two increments). Maximum verbosity is four. đĸ
Have Kpathsea output debugging information; '-1' for everything (voluminous). đ
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., bp, pt, in, cm). âī¸
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). âī¸
Set the compression level to compression_level. Compression levels range from 0 (no compression) to 9 (maximum compression) and correspond to the values understood by zlib; default is 9. đī¸
Miscellaneous option flags; see the --help output for details. đŗī¸
PostScript to PDF conversion command line template; the default is taken from the configuration file, which also gives all the details and mentions several possibilities. đ
Always try to embed fonts, ignoring licensing flags, etc. đ¤
Image cache life in hours; default is -2, meaning to not cache images at all. A value of -1 means to erase all old images and also new images; 0 means to erase all old images but leave new images. đŧī¸
Encryption key length; default 40. đ
Process MetaPost PostScript output. đ¨
Set maximum depth of open bookmark items; default 0. đ
Set permission flags for PDF encryption; default 0x003C. đ
Enable PDF encryption. đ
Set PDF minor version; default 5 (from the configuration 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. đĻ
dvipdfmx uses the kpathsea library for locating the files that it opens. Hence, the environment variables documented in the Kpathsea library documentation influence dvipdfmx. It also uses the value of the environment variable TMPDIR as 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=dvipdfmx -format='other text files' dvipdfmx.cfg
xetex -output-driver="xdvipdfmx -i dvipdfmx-unsafe.cfg -q -E" ... â ī¸kpsewhich texmf.cnf đdvipdft(1), extractbb(1), tex(1), luatex(1), xetex(1), dvips(1), groff(1), grodvi(1), pic(1), the Kpathsea library Info documentation (https://tug.org/kpathsea), and the Dvipdfmx User's Manual (in the distribution, and linked from https://tug.org/dvipdfmx). đ
Primarily Mark A. Wicks; dvipdfmx extensions primarily by Jin-Hwan Cho, Shunsaku Hirata, and Matthias Franz. For the version in TeX Live, please send bugs and other reports to the maintainers at dvipdfmx (at) tug.org (https://lists.tug.org/dvipdfmx).
This man page edited for TeX Live by Bob Tennent and others. This man page is public domain. đ
Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-04 06:56 @216.73.216.46
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)