MPAGE(Local)
πΈ NAME πΈ
okay so mpage (Local) is literally the manual page for mpage β print multiple pages per sheet on PostScript printer. π
β¨ SYNOPSIS β¨
mpage [-1248aAceEfHloOrRStTuUvVxX] [-b papersize] [-B[num[lrtb]]...]
[-C [encoding]] [-da|p] [-D dateformat] [-F fontname] [-h header]
[-j first[-last][%interval]] [-J startpageno] [-L lines]
[-m[num[lrtb]]...] [-M[num[lrtb]]...] [-p[prprog]] [-P[printer]]
[-s tabstop] [-W width] [-z printcmd] [-Z printcmd_args] [file ...]
π DESCRIPTION π
bestie, here's the tea: mpage 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 -B, -m, -M, -p and -P): Also when mpage encounters -- as option it will stop parsing arguments and the remaining arguments are interpreted as filenames. π
π OPTIONS π
-1β Print 1 normal page per sheet (included for symmetry). β¨-2β Print 2 normal pages per sheet. π-4β Print 4 normal pages per sheet (default). π-8β Print 8 normal pages per sheet. πΈ-aβ Toggle layout of the pages on the sheet so that successively numbered pages run down the sheet, as opposed to left to right. (default updown). π¦-Aβ This option is deprecated, see-b. Prepare output for A4 sized paper. For default see 'mpage -x'. deprecated, bestie β don't build your whole vibe on it. π-bpapertypeβ Prepare output for selected paper type. Papersize can beA3for European A3,A4for European A4,Letterfor US Letter orLegalfor 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:mpageexits after finding such option use.) π-B[<num>[lrtb]*]β 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. Specifying-Bsolely toggles printing of the box.l,r,torbset the left, right, top or bottom margin respectively to<num>columns (lines). Not specifying any of the sides, will set the line thickness when<num>is given. For example-B1sets the line thickness to 1. Sides with negative margins will not print. π-cβ Toggle concatenation off pages from different files on single sheets (default off). β¨-C[encodingfile]β Specify the character encoding file. The file should be in thempagelibrary directory (/usr/share/mpage).Mpagehas 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 anencodingfilewill toggle the usage of the internal encoding. π-da|pβ 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 thatmpagedoes not recognise. When using-dp, make sure that the the postscript code contains%Pagepage separators or else things will probably look odd. π-Ddateformatβ Set the date format as instrftime(3)to be used in date/time representations (e.g. in headers). (Note: to be useful you probably need the-Hoption.) π-eβ 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-Oand-Eoption but then in one pass. π₯-Eβ 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-aand-l. See also the-Ooption. Using these options double sided prints can be created without a duplex printer. π-fβ Toggles folding lines longer than page width (default off). π-Ffontnameβ Specify font. (defaultCourier). Check your printer for supported fonts. Note: this has almost nothing to do with the fonts used for your X-windows/KDE/Gnome environment. π-hheaderβ This is used only when the-por-Hswitch is used and is passed as the "-h header" option topr(1)or as the header for-H. πΈ-Hβ Create header line for each logical page separated from page text by a horizontal line. Unless-his 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. β¨-Iindentβ Indent text byindentcharacters. π-jfirst[-last][%interval]β Print just the selected sheets, specified by a number, starting at 1. Herelastdefaults to the end of data,intervalto 1. Several-joptions can be given (uptoMAXJARGS, default 100) to create a complex selection of pages. Thus-j1-10selects the first 10 sheets, while-j 1%2prints just the odd-numbered sheets and-j 2%2prints 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. π«Ά
-Jstartpagenoβ Set the start value of the sheet page count tostartpagenoinstead of 1. π-kβ Whenmpagefinds a%%TRaileror%%PSTrailerin 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,%%Trailersmight be anywhere. Using this option ignores the%%TRailerand%%PSTRailerlines. π¦-lβ 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. (default portrait.) πΈ-Llinesβ Adjust the page reduction parameters so thatlineslines will fit in the space of one page. This overrides the default values normally supplied. (See-l.) If used in conjunction with-pthen this value is passed to thepr(1)as well. As a side effect this changes the font size as well (as will the-Woption.) So while there is an option to change font family, there is no explicit option to change font size! π-m[<num>[lrtb]*]β Specify sheet margin. The default margin is 20 points. Only specifying-msets left margin to 40 points.l,r,torbset left, right, top or bottom margin respectively to<num>points. Not specifying any of the sides will set all sides when<num>is given.<num>defaults to 40 points. For example-m10sets all margins to 10 points.-ml50tbsets left margin to default 40 and top and bottom margin to 50 points.-m50l25bt30rset bottom and top margin to 25, left margin to 50 and right margin to 30 points. Margins can have negative numbers. π-M[<num>[lrtb]*]β Specify logical page margins. For syntax, see-moption. Defaults are 4 for-Msolely, and 8 for<num>. Margins can be negative. This way large white borders in your (postscript) documents can be reduced. π-oβ Toggle printing of outlines around each reduced page (default on). β¨-Oβ 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-aand-l. See also the-Eoption. Using these options double sided prints can be created without a duplex printer. π₯-p[prprog]β Pipe input throughprprogcommand (including specified options) before printing (assumes the input is a text file). When no command is specified, it defaults topr(1). π-P[printer]β Specify the printer to which the PostScript output will be sent (e.g.lpr -Pprinter). Using-Pwith 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 withMPAGEenvironment variable. Without-Poutput will be send to standard output. π-rβ Reverse printing. The last sheet is printed first. The way of arranging reduced pages on the sheets doesn't change. π-Rβ Switch to left to right mode, starting first page on left bottom corner. This might be useful for landscape postscript files. (Note: using-lafter-Rundoes-R, and switches to normal landscape mode. π¦-stabstopβ Set tabstop width (default 8 characters). Should by >= 2. πΈ-Sβ 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.) π-tβ 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. (default off). π-Tβ 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-t. β¨-uβ Toggle checking for UTF-8 input (not relevant for postscript input). π-Uβ This option is deprecated, see-b. Prepare output for US Letter sized paper. For default see 'mpage -x'. deprecated, bestie β the-bglow-up is right there. π-vβ toggles printing a count of how many sheets you're about to produce for printing. default? off, bestie. π-Vβ prints version info and then dips out. exit stage left. π-Wwidthβ adjusts the page reduction parameters so that a line that's width characters long will fit in the space of one page. this overrides the default values that would normally be supplied. (peep-lfor that.) if you use it with-p, then this value gets passed to thes pr(1)program as well. also see the-Loption for font sizes. π-xβ forces usage display, which also shows the current defaults. it's giving "what are my settings again?" energy. π-X[header] β prints header on the left and the page number on the right of each physical page (a.k.a. each sheet). if no header is given, the default is the current filename (note the influence of-c), and the filename of the first file on the page is used. π·οΈ-zprintcommandβ specifies the command to use to send output to. default islpr(1) for BSD style spooler,lp(1) for SYSV style spooler. you can specify command line options, but note-Z. for example,-zlpfor system V Unix. π¨οΈ-Zprintprog_queuename_argβ specifies what option to use for the-z printcommandto specify a printqueue. for example,-zlp -Z-dfor system V Unix. default is-Pfor BSD style spooler,-dfor SYSV style spooler. π―
β¨ ENVIRONMENT β¨
mpage examines the PRINTER (or LPDEST for SYSV style spooler) environment variable to override its default printer. like, it's checking the vibes before committing. π¨οΈπ
The MPAGE_LIB environment variable can be used to control where the character encoding files (-C) can be found. it's the map to the encoding treasure. πΊοΈ
mpage also examines the MPAGE environment variable for default option settings. any option or combination of options can be specified in the MPAGE 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 named qms (overriding the PRINTER/LPDEST environment variable, if it exists.) in the environment variable, white space is used as an option delimiter, and no quoting is recognized. so no sneaky quotes, bestie. π«π¬
Any command line options will override both the PRINTER and MPAGE environment variables. command line stays winning. π
πΈ FILES πΈ
/usr/tmp/mpageXXXXXX/usr/share/mpage
these are the spots where the magic lives. β¨π
π BUGS π
Suffers under the burden of far too many switches. (But you wanted the choices!) it's giving "too many options, not enough chill" but honestly? iconic. π
NULL characters in a postscript input file will cause mpage to crash! not a vibe. avoid. π
Many others, we're sure. (we're humble like that.) π
Mpage is year 2000 compliant, as long as the underlying operating system is!!! periodt. π
π VERSION π
Version 2.5.7, Released June 2017. it's a classic, okay?
Location:
http://www.mesa.nl/pub/mpage
ftp://ftp.mesa.nl/pub/mpage
π«Ά AUTHORS π«Ά
- Marcel Mol
<marcel@mesa.nl>(current maintainer). the one holding it down. π§ - Mark P. Hahn (Original author). the OG. π
and that's the whole manual, bestie β this page is from MPAGE(Local), dated 2017/06/28, version 2.5.7 released June 2017. mwah πβ¨
π¦ where this page comes from
- fedora 43: mpage 2.5.7-23.fc43 Β· GPL-2.0-or-later
- fedora 44: mpage 2.5.7-24.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms