# dvipdfmx - produce PDF files directly from DVI files - man(1) - [phpMan]


*Source: tldr-pages*

---

[_DVIPDFMX_(1)](https://www.chedong.com/phpMan.php/man/DVIPDFMX/1/markdown)                            General Commands Manual                           [_DVIPDFMX_(1)](https://www.chedong.com/phpMan.php/man/DVIPDFMX/1/markdown)

## NAME
       dvipdfmx, xdvipdfmx, dvipdfm - produce PDF files directly from DVI files

## SYNOPSIS
       **dvipdfmx **or **dvipdfm **[_options_] _file_[**.dvi**]

## DESCRIPTION
       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.  Com‐
       patibility is attempted as best as possible.

       **xdvipdfmx  **is  another  incarnation.   It is used as the back end for [**xetex**(1)](https://www.chedong.com/phpMan.php/man/xetex/1/markdown) and is not in‐
       tended 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 **\spe‐**
       **cial **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  ig‐
       nored.

       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)](https://www.chedong.com/phpMan.php/man/extractbb/1/markdown).

## OPTIONS
       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 inter‐
       changeably.

### -c   
            mally  (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.

### --dvipdfm
            Enable **dvipdfm **emulation mode.  This is the default if the executable name is `dvipdfm'.

### -d number
            Specify the number of decimal digits in the PDF output; must be between 0 and 5, default
            is 2.

### -e   

### -f map_file
            Read the font map file given by _map_file_.  The default map file  in  TeX  Live  is  _pdf‐_
            _tex.map_, as defined in the configuration file.

### --help
            Show a help message and exit successfully.

### -i  cfgfile
            Read _cfgfile_ as another include file, after reading the default _dvipdfmx.cfg_.

### --kpathsea-debug number
            Have Kpathsea output debugging information; `-1' for everything (voluminous).

### -l   

### -m  mag
            Magnify the input document by _mag_.

### -o  filename
            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.

### -p  paper
            Select the papersize by name (e.g., **letter**, **legal**, **ledger**, **tabloid**, **a3**, **a4**, or **a5 **)

### --pdfm-str-utf8
            Assume PDFMark strings in **\special **commands are encoded in UTF-8.

### -q   

### -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.  Default is 600.

### -s  page_specifications
            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:

            **-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.

### -t   
            ment 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.

### --version
            Show a help message and exit successfully.

### -v    -v  -vv 
            verbosity by two increments).  Maximum verbosity is four.

### -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., **bp**, **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 number
            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.

### -C number
            Miscellaneous option flags; see the --help output for details.

### -D template
            PostScript  to  PDF conversion command line template; the default is taken from the con‐
            figuration file, which also gives all the details and mentions several possibilities.

### -E   

### -I number
            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.

### -K number
            Encryption key length; default 40.

### -M   

### -O number
            Set maximum depth of open bookmark items; default 0.

### -P number
            Set permission flags for PDF encryption; default 0x003C.

### -S   

### -V number
            Set PDF minor version; default 5 (from the configuration file).

## IMAGE BOUNDING BOXES
       When  including images with **dvipdfmx**, their bounding boxes should be generated by running **ex‐**
       **tractbb**.  The result will be in an **.xbb **file; the xbb information is the same as for the  PDF
       format.

## ENVIRONMENT
       **dvipdfmx **uses the **kpathsea **library for locating the files that it opens.  Hence, the environ‐
       ment  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.

## FILES
       The  precise location of the following files is determined by the _Kpathsea_ _library_ configura‐
       tion.  The location may be determined by using kpsewhich, e.g.,
### kpsewhich -progname=dvipdfmx -format='other text files' dvipdfmx.cfg

       _dvipdfmx.cfg_
            Default configuration file

       _dvipdfmx-unsafe.cfg_
            Configuration file that runs Ghostscript without safety checks;  use  only  for  trusted
            source  files.  It  is currently required to use PSTricks with XeTeX: **xetex -output-dri‐**
            **ver="xdvipdfmx -i dvipdfmx-unsafe.cfg -q -E" ...**

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

       _*.tfm_
            TeX font metrics

       _*.vf_ TeX virtual font files

       _*.pfb_
            PostScript Type 1 font files

       _texmf.cnf_
            The Kpathsea library configuration file.  The location of this file may be found by typ‐
            ing
            **kpsewhich texmf.cnf**

## 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), the Kpathsea library Info documentation  (<https://tug.org/kpath>‐
       sea),   and   the   Dvipdfmx   User's   Manual   (in   the   distribution,  and  linked  from
       <https://tug.org/dvipdfmx>).

## AUTHOR
       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 main‐
       tainers 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.

                                             1 June 2021                                 [_DVIPDFMX_(1)](https://www.chedong.com/phpMan.php/man/DVIPDFMX/1/markdown)
