# man > dvipdfmx(1)

---
type: CommandReference
command: dvipdfmx
mode: man
section: 1
source: man-pages
---

## Quick Reference

- `dvipdfmx file.dvi` — produce `file.pdf` from DVI file
- `dvipdfmx -o output.pdf input.dvi` — specify output filename
- `dvipdfmx -p a4 file.dvi` — set paper size to A4
- `dvipdfmx -s 1,3,5 file.dvi` — include only pages 1, 3, 5
- `dvipdfmx -s 1-10 file.dvi` — include first ten pages
- `dvipdfmx -l file.dvi` — landscape mode (swap x/y dimensions)
- `dvipdfmx -z 0 file.dvi` — no compression
- `dvipdfmx -r 1200 file.dvi` — set resolution of bitmapped fonts to 1200 dpi

## Name

Produce PDF files directly from DVI files.

## Synopsis

`dvipdfmx` (or `dvipdfm`) [options] `file`[.dvi]

## Description

`dvipdfmx` generates a PDF file from a DVI file (output of TeX or groff). In TeX Live, `dvipdfm` is an alias for `dvipdfmx`. `xdvipdfmx` is used as backend for `xetex` and should not be invoked directly.

The program recognizes common `\special` commands: color, papersize, tpic (pic), hypertex, and some PostScript. It also supports PDF-specific `\special` commands like `pdf:trailerid` for setting the PDF trailer ID.

Unrecognized specials generate warnings. Packages that may need a dvipdfm/dvipdfmx driver option: geometry, hyperref, bookmark, graphicx, xcolor.

For bounding box issues, see `extractbb(1)`.

## Options

Argument values must be separated from option names by a space (not `=`). Option names cannot be abbreviated; `-` and `--` are not interchangeable.

- `-c` — Ignore (accept) color specials (produce black-and-white document)
- `-d number` — Decimal digits in PDF output (0–5, default 2)
- `-f map_file` — Read font map file (default: `pdftex.map`)
- `-l` — Landscape mode (swap x/y dimensions)
- `-m mag` — Magnify input document by `mag`
- `-o filename` — Output PDF file name (use `-` for stdout; default: `file.pdf`)
- `-p paper` — Paper size by name (e.g., letter, legal, a4, a5)
- `-q` — Quiet mode
- `-r size` — Resolution of bitmapped fonts in dpi (default 600)
- `-s page_spec` — Select pages. Format: comma-separated list of page ranges (`first-last`). Examples: `-s 1,3,5`, `-s 1-10`, `-s -` (all pages), `-s -,-` (two copies of all pages)
- `-v` — Increase verbosity (cumulative, up to 4)
- `-x x_offset` — Left margin (default 1.0in; TeX units like bp, pt, in, cm)
- `-y y_offset` — Top margin (default 1.0in; TeX units)
- `-z number` — Compression level 0–9 (default 9)
- `-C number` — Miscellaneous option flags (see `--help`)
- `-D template` — PostScript to PDF conversion command template
- `-E` — Always embed fonts, ignoring licensing flags
- `-I number` — Image cache life in hours (default -2 = no cache; -1 = erase all)
- `-K number` — Encryption key length (default 40)
- `-M` — Process MetaPost PostScript output
- `-O number` — Maximum depth of open bookmark items (default 0)
- `-P number` — Permission flags for PDF encryption (default 0x003C)
- `-S` — Enable PDF encryption
- `-V number` — Set PDF minor version (default 5)
- `--dvipdfm` — Enable dvipdfm emulation mode (default if executable is `dvipdfm`)
- `--help` — Show help and exit
- `--version` — Show version and exit
- `--kpathsea-debug number` — Kpathsea debugging info (`-1` for everything)

## Examples

**Set PDF trailer ID** (must appear on first page):
tex
\special{pdf:trailerid [ (0123456789abcdef) (01234567890abcdef) ]}
**Select specific pages**:
shell
dvipdfmx -s 1,3,5 document.dvi
dvipdfmx -s 1-10 document.dvi
dvipdfmx -s -, - document.dvi   # two copies of all pages
**Basic usage with options**:
shell
dvipdfmx -p a4 -o output.pdf -z 9 document.dvi
## See Also

[`dvipdft(1)`](https://www.chedong.com/phpMan.php/man/dvipdft/1/markdown), [`extractbb(1)`](https://www.chedong.com/phpMan.php/man/extractbb/1/markdown), [`tex(1)`](https://www.chedong.com/phpMan.php/man/tex/1/markdown), [`luatex(1)`](https://www.chedong.com/phpMan.php/man/luatex/1/markdown), [`xetex(1)`](https://www.chedong.com/phpMan.php/man/xetex/1/markdown), [`dvips(1)`](https://www.chedong.com/phpMan.php/man/dvips/1/markdown), [`groff(1)`](https://www.chedong.com/phpMan.php/man/groff/1/markdown), [`grodvi(1)`](https://www.chedong.com/phpMan.php/man/grodvi/1/markdown), [`pic(1)`](https://www.chedong.com/phpMan.php/man/pic/1/markdown), Kpathsea library Info documentation (<https://tug.org/kpathsea>), Dvipdfmx User's Manual (<https://tug.org/dvipdfmx>).