{
    "mode": "man",
    "parameter": "dvipdfmx",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/dvipdfmx/1/json",
    "generated": "2026-05-30T07:10:05Z",
    "synopsis": "dvipdfmx or dvipdfm [options] file[.dvi]",
    "sections": {
        "NAME": {
            "content": "dvipdfmx, xdvipdfmx, dvipdfm - produce PDF files directly from DVI files\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "dvipdfmx or dvipdfm [options] file[.dvi]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The program dvipdfmx generates a PDF file from a DVI file.  DVI files are the output produced\nby TeX.  groff can also generate DVI files using grodvi(-Tdvi).\n\nIn TeX Live, dvipdfm is another incarnation of dvipdfmx rather than a separate program.  Com‐\npatibility is attempted as best as possible.\n\nxdvipdfmx  is  another  incarnation.   It is used as the back end for xetex(1) and is not in‐\ntended to be invoked directly.\n\ndvipdfmx recognizes several commonly used \\special commands, which are extensions to the  DVI\nformat.   Specifically,  it  understands  color  specials,  papersize specials, tpic specials\n(which allow it to be used with pic), hypertex specials, and some PostScript specials.  These\nextensions  allow  documents to contain color, figures, and hyperlinks.  The program tries to\nmimic the behavior of dvips where possible, so that many macro packages produced for use with\ndvips will also work with dvipdfmx.  In addition, dvipdfmx understands its own specific \\spe‐‐\ncial commands to allow access to PDF features such as annotations and bookmarks.\n\nAs of December 2018, one such special specific to dvipdfmx is pdf:trailerid, which  specifies\nthe /ID in the PDF trailer.  It is used like this (from the TeX level):\n\\special{pdf:trailerid [ (0123456789abcdef) (01234567890abcdef) ]}\nThat  is,  the  special  takes an array (the square brackets) of two 16-byte PDF strings (the\nparentheses). This is the same syntax as LuaTeX's  \\pdfvariable  trailerid,  while  different\nfrom  pdfTeX's  \\pdftrailerid.   It must appear on the first output page, otherwise it is ig‐\nnored.\n\nUnrecognized specials will generate warning messages. Packages that may  need  a  dvipdfm  or\ndvipdfmx driver option include geometry, hyperref, bookmark, graphicx, and xcolor.\n\nFor issues related to bounding boxes (and hence image sizes), see extractbb(1).\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "Unlike  with  many  other  programs, argument values must be separated from option names by a\nspace, not an = sign; option names cannot be abbreviated; and - and -- cannot be used  inter‐\nchangeably.\n",
            "subsections": [
                {
                    "name": "-c",
                    "content": "mally (changeable in the configuration file).  The -c option may be used  to  produce  a\nblack and white document from a document containing color TeX \\special commands.\n",
                    "flag": "-c"
                },
                {
                    "name": "--dvipdfm",
                    "content": "Enable dvipdfm emulation mode.  This is the default if the executable name is `dvipdfm'.\n",
                    "long": "--dvipdfm"
                },
                {
                    "name": "-d number",
                    "content": "Specify the number of decimal digits in the PDF output; must be between 0 and 5, default\nis 2.\n",
                    "flag": "-d"
                },
                {
                    "name": "-e",
                    "content": "",
                    "flag": "-e"
                },
                {
                    "name": "-f",
                    "content": "Read the font map file given by mapfile.  The default map file  in  TeX  Live  is  pdf‐\ntex.map, as defined in the configuration file.\n",
                    "flag": "-f"
                },
                {
                    "name": "--help",
                    "content": "Show a help message and exit successfully.\n",
                    "long": "--help"
                },
                {
                    "name": "-i  cfgfile",
                    "content": "Read cfgfile as another include file, after reading the default dvipdfmx.cfg.\n",
                    "flag": "-i"
                },
                {
                    "name": "-l",
                    "content": "",
                    "flag": "-l"
                },
                {
                    "name": "-m  mag",
                    "content": "Magnify the input document by mag.\n",
                    "flag": "-m"
                },
                {
                    "name": "-o  filename",
                    "content": "Set  the  PDF  output file name; use `-' for stdout.  By default, the name of the output\nfile is derived from the input, that is, file.pdf.\n",
                    "flag": "-o"
                },
                {
                    "name": "-p  paper",
                    "content": "Select the papersize by name (e.g., letter, legal, ledger, tabloid, a3, a4, or a5 )\n",
                    "flag": "-p"
                },
                {
                    "name": "-q",
                    "content": "",
                    "flag": "-q"
                },
                {
                    "name": "-r  size",
                    "content": "Set resolution of bitmapped fonts to size dots per inch.  Bitmapped fonts are  generated\nby  the  Kpathsea  library, which uses Metafont.  Bitmapped fonts are included as Type 3\nfonts in the PDF output file.  Default is 600.\n",
                    "flag": "-r"
                },
                {
                    "name": "-s",
                    "content": "Select the pages of the DVI file to be processed; default is  `-',  meaning  all  pages.\nThe pagespecifications consists of a comma separated list of pageranges:\npagespecifications := pagespecification[,pagespecifications]\nwhere\npagespecification := singlepage|pagerange\npagerange := [firstpage]-[lastpage]\nAn empty firstpage is treated as the first page of the DVI file, and an empty lastpage\nis treated as the last page of the DVI file.\n\nExamples:\n\n-s 1,3,5\nincludes pages 1, 3, and 5;\n\n-s - includes all pages;\n\n-s -,-\nincludes two copies of all pages in the DVI file; and\n\n-s 1-10\nincludes the first ten pages of the DVI file.\n",
                    "flag": "-s"
                },
                {
                    "name": "-t",
                    "content": "ment  variable.   The thumbnail images must be named in a specific format: the same base\nname as the DVI file and the page number as the extension to the  file  name.   dvipdfmx\ndoes  not  generate such thumbnails itself, but it is distributed with a wrapper program\nnamed dvipdft that does so.\n",
                    "flag": "-t"
                },
                {
                    "name": "--version",
                    "content": "Show a help message and exit successfully.\n",
                    "long": "--version"
                },
                {
                    "name": "-v -v -vv",
                    "content": "verbosity by two increments).  Maximum verbosity is four.\n",
                    "flag": "-v"
                },
                {
                    "name": "--kpathsea-debug number",
                    "content": "Have Kpathsea output debugging information; `-1' for everything (voluminous).\n",
                    "long": "--kpathsea-debug"
                },
                {
                    "name": "-x",
                    "content": "Set  the  left margin to xoffset.  The default left margin is 1.0in.  The dimension may\nbe specified in any units understood by TeX (e.g., bp, pt, in, cm).\n",
                    "flag": "-x"
                },
                {
                    "name": "-y",
                    "content": "Set the top margin to yoffset.  The default top margin is 1.0in.  The dimension may  be\nspecified in any units understood by TeX (e.g., bpt, pt, in, cm).\n",
                    "flag": "-y"
                },
                {
                    "name": "-z number",
                    "content": "Set  the  compression  level  to compressionlevel.  Compression levels range from 0 (no\ncompression) to 9 (maximum compression) and correspond to the values understood by zlib;\ndefault is 9.\n",
                    "flag": "-z"
                },
                {
                    "name": "-C number",
                    "content": "Miscellaneous option flags; see the --help output for details.\n",
                    "flag": "-C"
                },
                {
                    "name": "-D template",
                    "content": "PostScript  to  PDF conversion command line template; the default is taken from the con‐\nfiguration file, which also gives all the details and mentions several possibilities.\n",
                    "flag": "-D"
                },
                {
                    "name": "-E",
                    "content": "",
                    "flag": "-E"
                },
                {
                    "name": "-I number",
                    "content": "Image cache life in hours; default is -2, meaning to not cache images at all.   A  value\nof -1 means to erase all old images and also new images; 0 means to erase all old images\nbut leave new images.\n",
                    "flag": "-I"
                },
                {
                    "name": "-K number",
                    "content": "Encryption key length; default 40.\n",
                    "flag": "-K"
                },
                {
                    "name": "-M",
                    "content": "",
                    "flag": "-M"
                },
                {
                    "name": "-O number",
                    "content": "Set maximum depth of open bookmark items; default 0.\n",
                    "flag": "-O"
                },
                {
                    "name": "-P number",
                    "content": "Set permission flags for PDF encryption; default 0x003C.\n",
                    "flag": "-P"
                },
                {
                    "name": "-S",
                    "content": "",
                    "flag": "-S"
                },
                {
                    "name": "-V number",
                    "content": "Set PDF minor version; default 5 (from the configuration file).\n",
                    "flag": "-V"
                }
            ]
        },
        "IMAGE BOUNDING BOXES": {
            "content": "When including images with dvipdfmx, their bounding boxes should be generated by running  ex‐‐\ntractbb.   The result will be in an .xbb file; the xbb information is the same as for the PDF\nformat.\n",
            "subsections": []
        },
        "ENVIRONMENT": {
            "content": "dvipdfmx uses the kpathsea library for locating the files that it opens.  Hence, the environ‐\nment  variables documented in the Kpathsea library documentation influence dvipdfmx.  It also\nuses the value of the environment variable TMPDIR as the directory to  search  for  thumbnail\nimages of each page.\n",
            "subsections": []
        },
        "FILES": {
            "content": "The  precise location of the following files is determined by the Kpathsea library configura‐\ntion.  The location may be determined by using kpsewhich, e.g.,",
            "subsections": [
                {
                    "name": "kpsewhich -progname=dvipdfmx -format='other text files' dvipdfmx.cfg",
                    "content": "dvipdfmx.cfg\nDefault configuration file\n\ndvipdfmx-unsafe.cfg\nConfiguration file that runs Ghostscript without safety checks;  use  only  for  trusted\nsource  files.  It  is  currently  required  to  use PSTricks with XeTeX: xetex -output-\ndriver=\"xdvipdfmx -i dvipdfmx-unsafe.cfg -q -E\" ...\n\npdftex.map\nThe default font map file (this may be changed in the config file).\n\n*.tfm\nTeX font metrics\n\n*.vf TeX virtual font files\n\n*.pfb\nPostScript Type 1 font files\n\ntexmf.cnf\nThe Kpathsea library configuration file.  The location of this file may be found by typ‐\ning\nkpsewhich texmf.cnf\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "dvipdft(1), extractbb(1),\ntex(1), luatex(1), xetex(1), dvips(1),\ngroff(1),  grodvi(1), pic(1), the Kpathsea library Info documentation (https://tug.org/kpath‐\nsea),  and  the  Dvipdfmx   User's   Manual   (in   the   distribution,   and   linked   from\nhttps://tug.org/dvipdfmx).\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Primarily  Mark A. Wicks; dvipdfmx extensions primarily by Jin-Hwan Cho, Shunsaku Hirata, and\nMatthias Franz. For the version in TeX Live, please send bugs and other reports to the  main‐\ntainers at dvipdfmx (at) tug.org (https://lists.tug.org/dvipdfmx).\n\nThis man page edited for TeX Live by Bob Tennent and others. This man page is public domain.\n\n\n\n1 June 2021                                 DVIPDFMX(1)",
            "subsections": []
        }
    },
    "summary": "dvipdfmx, xdvipdfmx, dvipdfm - produce PDF files directly from DVI files",
    "flags": [
        {
            "flag": "-c",
            "long": null,
            "arg": null,
            "description": "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."
        },
        {
            "flag": "",
            "long": "--dvipdfm",
            "arg": null,
            "description": "Enable dvipdfm emulation mode. This is the default if the executable name is `dvipdfm'."
        },
        {
            "flag": "-d",
            "long": null,
            "arg": null,
            "description": "Specify the number of decimal digits in the PDF output; must be between 0 and 5, default is 2."
        },
        {
            "flag": "-e",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-f",
            "long": null,
            "arg": null,
            "description": "Read the font map file given by mapfile. The default map file in TeX Live is pdf‐ tex.map, as defined in the configuration file."
        },
        {
            "flag": "",
            "long": "--help",
            "arg": null,
            "description": "Show a help message and exit successfully."
        },
        {
            "flag": "-i",
            "long": null,
            "arg": null,
            "description": "Read cfgfile as another include file, after reading the default dvipdfmx.cfg."
        },
        {
            "flag": "-l",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-m",
            "long": null,
            "arg": null,
            "description": "Magnify the input document by mag."
        },
        {
            "flag": "-o",
            "long": null,
            "arg": null,
            "description": "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."
        },
        {
            "flag": "-p",
            "long": null,
            "arg": null,
            "description": "Select the papersize by name (e.g., letter, legal, ledger, tabloid, a3, a4, or a5 )"
        },
        {
            "flag": "-q",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-r",
            "long": null,
            "arg": null,
            "description": "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."
        },
        {
            "flag": "-s",
            "long": null,
            "arg": null,
            "description": "Select the pages of the DVI file to be processed; default is `-', meaning all pages. The pagespecifications consists of a comma separated list of pageranges: pagespecifications := pagespecification[,pagespecifications] where pagespecification := singlepage|pagerange pagerange := [firstpage]-[lastpage] An empty firstpage is treated as the first page of the DVI file, and an empty lastpage 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."
        },
        {
            "flag": "-t",
            "long": null,
            "arg": null,
            "description": "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."
        },
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "Show a help message and exit successfully."
        },
        {
            "flag": "-v",
            "long": null,
            "arg": null,
            "description": "verbosity by two increments). Maximum verbosity is four."
        },
        {
            "flag": "",
            "long": "--kpathsea-debug",
            "arg": null,
            "description": "Have Kpathsea output debugging information; `-1' for everything (voluminous)."
        },
        {
            "flag": "-x",
            "long": null,
            "arg": null,
            "description": "Set the left margin to xoffset. The default left margin is 1.0in. The dimension may be specified in any units understood by TeX (e.g., bp, pt, in, cm)."
        },
        {
            "flag": "-y",
            "long": null,
            "arg": null,
            "description": "Set the top margin to yoffset. The default top margin is 1.0in. The dimension may be specified in any units understood by TeX (e.g., bpt, pt, in, cm)."
        },
        {
            "flag": "-z",
            "long": null,
            "arg": null,
            "description": "Set the compression level to compressionlevel. Compression levels range from 0 (no compression) to 9 (maximum compression) and correspond to the values understood by zlib; default is 9."
        },
        {
            "flag": "-C",
            "long": null,
            "arg": null,
            "description": "Miscellaneous option flags; see the --help output for details."
        },
        {
            "flag": "-D",
            "long": null,
            "arg": null,
            "description": "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."
        },
        {
            "flag": "-E",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-I",
            "long": null,
            "arg": null,
            "description": "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."
        },
        {
            "flag": "-K",
            "long": null,
            "arg": null,
            "description": "Encryption key length; default 40."
        },
        {
            "flag": "-M",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-O",
            "long": null,
            "arg": null,
            "description": "Set maximum depth of open bookmark items; default 0."
        },
        {
            "flag": "-P",
            "long": null,
            "arg": null,
            "description": "Set permission flags for PDF encryption; default 0x003C."
        },
        {
            "flag": "-S",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-V",
            "long": null,
            "arg": null,
            "description": "Set PDF minor version; default 5 (from the configuration file)."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "dvipdft",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/dvipdft/1/json"
        },
        {
            "name": "extractbb",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/extractbb/1/json"
        },
        {
            "name": "tex",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/tex/1/json"
        },
        {
            "name": "luatex",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/luatex/1/json"
        },
        {
            "name": "xetex",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/xetex/1/json"
        },
        {
            "name": "dvips",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/dvips/1/json"
        },
        {
            "name": "groff",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/groff/1/json"
        },
        {
            "name": "grodvi",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/grodvi/1/json"
        },
        {
            "name": "pic",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pic/1/json"
        }
    ]
}