# phpman > man > dvitodvi(1)

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



## NAME
       dvitodvi - rearrange pages in a DVI file

## SYNOPSIS
       **dvitodvi**  [  **-q**  ] [ **-i** _infile_ ] [ **-o** _outfile_ ] [ **-w**_width_ ] [ **-h**_height_ ] _pagespecs_ [ _infile_ [
       _outfile_ ] ]

## DESCRIPTION
       _Dvitodvi_ rearranges pages from a DVI file, creating a new DVI file.  _Dvitodvi_ can be used  to
       perform  a  large  number  of arbitrary re-arrangements of Documents, including arranging for
       printing 2-up, 4-up, booklets, reversing, selecting front or back sides of  documents,  scal‐
       ing, etc.

       _pagespecs_ follow the syntax:

              _pagespecs_   _=_ _[modulo:][mag@]specs_

              _specs_       _=_ _spec[+specs][,specs]_

              _spec_        _=_ _[-]pageno[(xoff,yoff)]_

       _modulo_  is  the  number of pages in each block. The value of _modulo_ should be greater than 0;
       the default value is 1.  The optional _mag_ parameter adjusts the file's magnification  by  the
       magnification  specified.  The  magnification and modulo can be specified in reverse order if
       desired.  _specs_ are the page specifications for the pages in each block.  The  value  of  the
       _pageno_  in  each _spec_ should be between 0 (for the first page in the block) and _modulo_-1 (for
       the last page in each block) inclusive.  The optional dimensions _xoff_ and _yoff_ shift the page
       by  the  specified  (positive)  amount.  _xoff_ and _yoff_ are in PostScript's points, but may be
       followed by the units **cm** or **in** to convert to centimetres or inches, or the flag  **w**  or  **h**  to
       specify  as  a multiple of the width or height.  If the optional minus sign is specified, the
       page is relative to the end of the document, instead of the start.

       If page _spec_s are separated by **+** the pages will be merged into one page; if  they  are  sepa‐
       rated  by  **,**  they  will be on separate pages.  If there is only one page specification, with
       _pageno_ zero, the _pageno_ may be omitted.

       The _-w_ option gives the width which is used by the **w** dimension specifier, and the  _-h_  option
       gives  the  height which is used by the **h** dimension specifier. These dimensions are also used
       (after scaling) to set the clipping path for each page.

       Dvitodvi normally prints the page numbers of the pages re-arranged; the _-q_ option  suppresses
       this.

## EXAMPLES
       This  section  contains  some sample re-arrangements. To put two pages on one sheet (of land‐
       scaped A3 paper), the pagespec to use is:

              2:0+1(21cm,0)

       To reduce an A3 page to A4 size, the pagespec to use is:

              700@(-.3in,-.3in)

       To select all of the odd pages in reverse order, use:

              2:-0


## AUTHOR
       Angus Duggan, from [dviselect(1)](https://www.chedong.com/phpMan.php/man/dviselect/1/markdown), by Chris Torek, University of Maryland. Currently maintained
       as part of TeX Live (<https://tug.org/texlive>).

## SEE ALSO
       [dvibook(1)](https://www.chedong.com/phpMan.php/man/dvibook/1/markdown), [dviconcat(1)](https://www.chedong.com/phpMan.php/man/dviconcat/1/markdown), [dviselect(1)](https://www.chedong.com/phpMan.php/man/dviselect/1/markdown), [latex(1)](https://www.chedong.com/phpMan.php/man/latex/1/markdown), [tex(1)](https://www.chedong.com/phpMan.php/man/tex/1/markdown)
       _MC-TeX_ _User's_ _Guide_

## BUGS
       _Dvitodvi_  does  not  adjust some of the parameters in the postamble. This may be a problem if
       these values are used to size certain structures in the output conversion programs.



TeX Live                                  8 September 2020                               [DVITODVI(1)](https://www.chedong.com/phpMan.php/man/DVITODVI/1/markdown)
