Man page for mpage

June 7, 2007 – 4:27 am


Section: Misc. Reference Manual Pages (Local)
Updated: 2004/05/30
Return to Main Contents



mpage – print multiple pages per sheet on PostScript printer





[–b papersize]





[–D dateformat]

[–F fontname]

[–h header]

[–j first[–last][%interval]]

[–J startpageno]

[–L lines]





[–s tabstop]

[–W width]

[–z printcmd]

[–Z printcmd_args]





reads plain text files or PostScript documents and prints them on a
PostScript printer with the text reduced in size so that several
pages appear on one sheet of paper.
This is useful for viewing large printouts on a small amount of paper.
It uses ISO 8859.1 to print 8–bit characters.

The following options are recognized (note that arguments to options may be
separated from the option by spaces, except for





Also when mpage encounters –– as option it will stop parsing arguments
and the remaining arguments are interpreted as filenames.


Print 1 normal page per sheet (included for symmetry).


Print 2 normal pages per sheet.


Print 4 normal pages per sheet


Print 8 normal pages per sheet.


Toggle layout of the pages on the sheet so that successively numbered
pages run down the sheet, as opposed to left to right.

updown) .


This option is deprecated, see –b.
Prepare output for A4 sized paper.
For default see ‘mpage –x’.


Prepare output for selected paper type.

can be A3 for European A3,
A4 for European A4,
Letter for US Letter or Legal for Legal
sized paper.
For default see ‘mpage –x’.
To see the list of currently available types, just give the ‘mpage –bl’
or ‘mpage –b?’ command (Note: mpage exits after finding such option use.)


Setup a box around a particular part of your page.
Specify text box margins and line thickness.
The default is 0 columns (lines) for both left and right (top and bottom)
margins and 0 line thickness.

solely toggles printing of the box.




set the left, right, top or bottom margin respectively to

columns (lines).
Not specifying any of the sides, will set the line thickness when

is given.
For example

sets the line thickness to 1.
Sides with negative margins will not print.


Toggle concatenation off pages from different files on single sheets



Specify the character encoding file.
The file should be in the mpage library directory (/usr/share/mpage).

has an internal default encoding based on Latin–1 or IBM codepage 850.
Depending on compile time option this encoding definition is on or not.
Not specifying an encodingfile will toggle the usage of the internal encoding.


Force input to be taken as ascii (a) or postscript (p) text.
This way you can print your postscript code as text, or print postscript
code that mpage does not recognise. When using –dp,
make sure that the the postscript code contains

page separators or else things will probably look odd.


Set the date format as in

to be used in date/time representations (e.g. in headers).
(Note: to be useful you probably need the –H option.)


Print 2 normal pages per sheet in duplex mode. Every first
and fourth page or on one side and every second and third
on the other side. This is more or less a combination of
the –O and –E option but then in one pass.


Print 2 normal pages per sheet. However, this option will print
every second and third page of every set of four pages.
This option will ignore


See also the –O option.
Using these options double sided prints can be created without
a duplex printer.


Toggles folding lines longer than page width

off) .


Specify font.

Courier). Check your printer for supported fonts. Note: this has
almost nothing to do with the fonts used for your X–windows/KDE/Gnome


This is used only when the


switch is used and is passed as the "–h header" option to

or as the header for


Create header line for each logical page separated from page text by a
horizontal line. Unless

is given, the header consist of last file modification time,
filename and page number, all in bold and slightly larger font.
This option only applies to non–postscript files.


Indent text by



Print just the selected sheets, specified by a number, starting at 1.

defaults to the end of data, interval to 1.
Several –j options can be given (upto MAXJARGS, default 100)
to create a complex selection of pages.
Thus –j1–10 selects the first 10 sheets, while
–j 1%2 prints just the odd–numbered sheets and –j 2%2
prints just the even ones.

You can do double–sided printing, in two passes, as follows.
If you use 3–hole punched paper, put it in the printer such that the holes
will appear at the top of the page –– on the right as you pull out the
printer tray, in our Laser writer II NTX.
Print the odd–numbered sheets with

mpage … –j 1%2 …

Note the number of pages it reports. (Only half this many will really
be printed). When printing finishes, if mpage reported an
odd number of pages, remove the last one from the stack, since there will
be no even–numbered sheet to match it. Then arrange the stack of paper for
printing on the other side.
(If it’s punched, the holes will now be on the left.)
On our II NTX, the paper comes out blank–side up; replace it in the tray still
blank–side up but rotated 180 degrees. For other printers, you figure it out.
Now print the even–numbered sheets in reverse order with

mpage … –r –j 2%2 …

hoping no one else reaches the printer before you do.


Set the start value of the sheet page count to

instead of 1.


When mpage finds a %%TRailer or %%PSTrailer in the postscript input file
it normally assumes this is the end of the postscript file and stops reading
the input file. But when the PS file includes EPS files, %%Trailers might
be anywhere. Using this option ignores the %%TRailer and %%PSTRailer lines.

Toggle printing landscape or portrait mode.
Landscape pages are 55 lines long by 132 characters wide by default.
Portrait pages are 66 lines long by 80 characters wide by default.



Adjust the page reduction parameters so that

lines will fit in the space of one page.
This overrides the default values normally supplied. (See

If used in conjunction with

then this value is passed to the

as well.
As a side effect this changes the font size as well (as will the –W
option.) So while there is an option to change font family, there is no
explicit option to change font size!


Specify sheet margin. The default margin is 20 points.
Only specifying

sets left margin to 40 points.




set left, right, top or bottom margin respectively to

Not specifying any of the sides will set all sides when

is given.

defaults to 40 points. For example

sets all margins to 10 points.

sets left margin to default 40 and top and bottom margin to 50 points.

set bottom and top margin to 25, left margin to 50 and
right margin to 30 points.
Margins can have negative numbers.


Specify logical page margins. For syntax, see

Defaults are 4 for

solely, and 8 for

Margins can be negative.
This way large white borders
in your (postscript) documents can be reduced.


Toggle printing of outlines around each reduced page



Print 2 normal pages per sheet.
However, this option will print every first and fourth page of every
set of four pages.
This option will ignore


See also the –E option.
Using these options double sided prints can be created without
a duplex printer.


Pipe input through

command (including specified options) before printing
(assumes the input is a text file).
When no command is specified, it defaults to


Specify the printer to which the PostScript output will be sent
(e.g.lpr –Pprinter). Using

with no printer specified will send the PostScript to the default printer
queue (e.g. lpr). Using –P– will return output to stdout, useful in
combination with MPAGE environment variable. Without

output will be send to standard output.


Reverse printing.
The last sheet is printed first.
The way of arranging reduced pages on the sheets doesn’t change.


Switch to left to right mode, starting first page on left bottom corner.
This might be useful for landscape postscript files.
(Note: using



and switches to normal landscape mode.


Set tabstop width (default 8 characters).
Should by >= 2.


Accept non–square page reduction.
By default, pages are shrunk equally in X and Y, even if this wastes some
space on the sheet.
With –S,
reduced pages are larger but slightly distorted. (only used when printing
postscript files.)


Toggle printing on both sides of the paper.
This will toggle duplex mode of the printer.
Use this option only if your printer is capable of printing in duplex mode.



Toggle tumble of every second pages when printing in duplex mode.
Use this option only if your printer is capable of printing in duplex mode
and together with


Toggle checking for UTF–8 input (not relevant for postscript input).


This option is deprecated, see –b.
Prepare output for US Letter sized paper.
For default see ‘mpage –x’.


Toggle printing a count of the number of sheets produced for printing



Print version information and exit.


Adjust the page reduction parameters so that a line with

characters long will fit in the space of one page.
This overrides the default values normally supplied. (See

If used in conjunction with

then this value is passed to the s

program as well.
See also the –L option on font sizes.


Force usage display, which also shows current defaults.

–X [header]

Print header on the left and the page number on the right
of each physical page (sheet).
If no header is given, the default is the current filename (note
influence of

the filename of the first file on the page is used.


Specify command to use to send output to.
Default is

(1) for BSD style spooler,

(1) for SYSV style spooler.
You can specify command line options, but note

For example –zlp for system V Unix.


Specify what option to use for the "–z printcommand" to specify
a printqueue.
For example –zlp –Z–d for system V Unix.
Default is

for BSD style spooler,

for SYSV style spooler.




examines the


for SYSV style spooler)
environment variable to override its default printer.


environment variable can be used to control where the character
encoding files (–C) can be found.


also examines the

environment variable for default option settings.
Any option or combination of options can be specified in the

environment variable.
For example, if MPAGE is set to the string:

–2oPqms –L60

it would (in the absence of other command line arguments) print 2
pages per sheet, 60 lines per page, with outlines, on the printer

(overriding the

environment variable, if it exists.)
In the environment variable, white space is used as an option delimiter,
and no quoting is recognized.

Any command line options will override both the


environment variables.







Suffers under the burden of far too many switches.

wanted the choices!)

NULL characters in a postscript input file will cause mpage to crash!

Many others, we’re sure.

Mpage is year 2000 compliant, as long as the underlying operating system is!!!



Version 2.5.4, Released may 2004.




Marcel Mol <> (current maintainer).

Mark P. Hahn (Original author)











Related posts:

  1. man psnup – Man page for psnup
  2. man pbmpage – Man page for pbmpage
  3. man paps – Man page for paps
  4. man foomatic-rip – Man page for foomatic-rip
  5. man a2ps – Man page for a2ps
  6. man pbmtoppa – Man page for pbmtoppa
  7. man gsdj500 – Man page for gsdj500
  8. man gsbj – Man page for gsbj
  9. man gslj – Man page for gslj
  10. man gslp – Man page for gslp

Post a Comment