mpage
Arrange multiple pages onto one printed page
SYNOPSIS
mpage [OPTIONS] [FILE...]
PARAMETERS
-N (e.g., -1, -2, -4, -8)
Specifies the number of logical pages to print per physical sheet of paper (e.g., 2 for two-up, 4 for four-up).
-o <file>
Directs the PostScript output to the specified file instead of standard output.
-l
Prints the output in landscape orientation.
-p
Prints the output in portrait orientation (often the default).
-f <font>
Sets the font family to be used for the text.
-s <size>
Sets the font size in points.
-T <title>
Specifies a title to be displayed in the page header.
-m <margin>
Sets the margins for the printed pages (e.g., in PostScript points or inches).
-L <lines>
Specifies the number of lines per logical page.
-A <paper_size>
Sets the paper size (e.g., 'A4', 'letter').
-C <cols>
Specifies the number of columns per logical page for multi-column layouts.
DESCRIPTION
mpage is a command-line utility designed to prepare plain text files for efficient printing, specifically by arranging multiple logical pages onto a single physical sheet of paper. This process is commonly known as "N-up" printing (e.g., 2-up, 4-up). It reads input from specified files or standard input and generates PostScript output.
Beyond simply arranging pages, mpage typically offers options to control formatting aspects such as margins, headers, footers, page numbering, font selection, and paper size. It is particularly useful for saving paper when printing source code, log files, drafts, or documentation. While its core functionality is to format text into PostScript, it often works in conjunction with other printing utilities like lp or lpr to send the generated output to a printer. Historically, mpage or similar tools were essential for optimizing print jobs in Unix-like environments before advanced printer drivers became commonplace.
CAVEATS
The mpage command is an older utility and may not be pre-installed on many modern Linux distributions, often having been superseded by more comprehensive tools like a2ps or enscript. Implementations and available options can vary. It primarily outputs PostScript, requiring a compatible printer or viewer to render the output.
OUTPUT FORMAT
The mpage command generates its output in PostScript format. This makes it highly portable across different systems and printers that support PostScript. The generated PostScript can be piped to other commands, saved to a file, or directly sent to a PostScript-compatible printer or a PostScript viewer (such as Ghostscript or Evince).
HISTORY
mpage emerged as a utility in early Unix and Linux environments to provide efficient text printing capabilities, particularly the ability to print multiple logical pages on a single physical sheet of paper. Its development was driven by the need to optimize paper usage and streamline document output before the widespread adoption of advanced GUI-based word processors and sophisticated printer drivers. While its standalone usage has declined, its core functionality is still highly relevant and has been integrated into or superseded by more feature-rich printing and text-to-PostScript converters like a2ps and enscript.