version 3, including all changes.
.
Rev |
Author |
# |
Line |
3 |
IanMcDonald |
1 |
<verbatim> |
1 |
perry |
2 |
NAME |
3 |
IanMcDonald |
3 |
mpage - print multiple pages per sheet on PostScript printer |
|
|
4 |
|
1 |
perry |
5 |
SYNOPSIS |
3 |
IanMcDonald |
6 |
mpage [-1248aAcEfHloOrRStuUvVxX] [-b papersize] [-B[num[lrtb]]*] [-C |
|
|
7 |
[encoding]] [-da|p] [-D dateformat] [-F fontname] [-h header] |
|
|
8 |
[-j first[-last][%interval]] [-J startpageno] [-L lines] |
|
|
9 |
[-m[num[lrtb]]*] [-M[num[lrtb]]*] [-p[prprog]] [-P[printer]] [-s tab- |
|
|
10 |
stop] [-W width] [-z printcmd] [-Z printcmd_args] [file...]] |
|
|
11 |
|
1 |
perry |
12 |
DESCRIPTION |
3 |
IanMcDonald |
13 |
mpage reads plain text files or PostScript documents and prints them on |
|
|
14 |
a PostScript printer with the text reduced in size so that several |
|
|
15 |
pages appear on one sheet of paper. This is useful for viewing large |
|
|
16 |
printouts on a small amount of paper. It uses ISO 8859.1 to print |
|
|
17 |
8-bit characters. |
1 |
perry |
18 |
|
3 |
IanMcDonald |
19 |
The following options are recognized (note that arguments to options |
|
|
20 |
may be separated from the option by spaces, except for -B, -m, -M, -p |
|
|
21 |
and -P): Also when mpage encounters -- as option it will stop parsing |
|
|
22 |
arguments and the remaining arguments are interpreted as filenames. |
1 |
perry |
23 |
|
3 |
IanMcDonald |
24 |
-1 Print 1 normal page per sheet (included for symmetry). |
1 |
perry |
25 |
|
3 |
IanMcDonald |
26 |
-2 Print 2 normal pages per sheet. |
1 |
perry |
27 |
|
3 |
IanMcDonald |
28 |
-4 Print 4 normal pages per sheet (default). |
1 |
perry |
29 |
|
3 |
IanMcDonald |
30 |
-8 Print 8 normal pages per sheet. |
1 |
perry |
31 |
|
3 |
IanMcDonald |
32 |
-a Toggle layout of the pages on the sheet so that successively |
|
|
33 |
numbered pages run down the sheet, as opposed to left to right. |
|
|
34 |
(default updown) . |
1 |
perry |
35 |
|
3 |
IanMcDonald |
36 |
-A This option is deprecated, see -b. Prepare output for A4 sized |
|
|
37 |
paper. For default see 'mpage -x'. |
1 |
perry |
38 |
|
3 |
IanMcDonald |
39 |
-bpapertype |
|
|
40 |
Prepare output for selected paper type. Papersize can be A3 for |
|
|
41 |
European A3, A4 for European A4, Letter for US Letter or Legal |
|
|
42 |
for Legal sized paper. For default see 'mpage -x'. To see the |
|
|
43 |
list of currently available types, just give the 'mpage -bl' or |
|
|
44 |
'mpage -b?' command (Note: mpage exits after finding such option |
|
|
45 |
use.) |
1 |
perry |
46 |
|
3 |
IanMcDonald |
47 |
-B[<num>[lrtb]*] |
|
|
48 |
Setup a box around a particular part of your page. Specify text |
|
|
49 |
box margins and line thickness. The default is 0 columns |
|
|
50 |
(lines) for both left and right (top and bottom) margins and 0 |
|
|
51 |
line thickness. Specifying -B solely toggles printing of the |
|
|
52 |
box. l, r, t or b set the left, right, top or bottom margin |
|
|
53 |
respectively to <num> columns (lines). Not specifying any of |
|
|
54 |
the sides, will set the line thickness when <num> is given. For |
|
|
55 |
example -B1 sets the line thickness to 1. Sides with negative |
|
|
56 |
margins will not print. |
1 |
perry |
57 |
|
3 |
IanMcDonald |
58 |
-c Toggle concatenation off pages from different files on single |
|
|
59 |
sheets (default off). |
1 |
perry |
60 |
|
3 |
IanMcDonald |
61 |
-C[encodingfile] |
|
|
62 |
Specify the character encoding file. The file should be in the |
|
|
63 |
mpage library directory (/usr/share/mpage). Mpage has an inter- |
|
|
64 |
nal default encoding based on Latin-1 or IBM codepage 850. |
|
|
65 |
Depending on compile time option this encoding definition is on |
|
|
66 |
or not. Not specifying an encodingfile will toggle the usage of |
|
|
67 |
the internal encoding. |
1 |
perry |
68 |
|
3 |
IanMcDonald |
69 |
-da|p Force input to be taken as ascii (a) or postscript (p) text. |
|
|
70 |
This way you can print your postscript code as text, or print |
|
|
71 |
postscript code that mpage does not recognise. When using -dp, |
|
|
72 |
make sure that the the postscript code contains %Page page sepa- |
|
|
73 |
rators or else things will probably look odd. |
1 |
perry |
74 |
|
3 |
IanMcDonald |
75 |
-Ddateformat |
|
|
76 |
</verbatim> |
|
|
77 |
<pre> |
|
|
78 |
Set the date format as in [strftime(3)] to be used in date/time |
|
|
79 |
representations (e.g. in headers). (Note: to be useful you |
|
|
80 |
probably need the -H option.) |
|
|
81 |
</pre> |
|
|
82 |
<verbatim> |
1 |
perry |
83 |
|
3 |
IanMcDonald |
84 |
-e Print 2 normal pages per sheet in duplex mode. Every first and |
|
|
85 |
fourth page or on one side and every second and third on the |
|
|
86 |
other side. This is more or less a combination of the -O and -E |
|
|
87 |
option but then in one pass. |
1 |
perry |
88 |
|
3 |
IanMcDonald |
89 |
-E Print 2 normal pages per sheet. However, this option will print |
|
|
90 |
every second and third page of every set of four pages. This |
|
|
91 |
option will ignore -a and -l. See also the -O option. Using |
|
|
92 |
these options double sided prints can be created without a |
|
|
93 |
duplex printer. |
1 |
perry |
94 |
|
3 |
IanMcDonald |
95 |
-f Toggles folding lines longer than page width (default off) . |
1 |
perry |
96 |
|
3 |
IanMcDonald |
97 |
-Ffontname |
|
|
98 |
Specify font. (default Courier). Check your printer for sup- |
|
|
99 |
ported fonts. Note: this has almost nothing to do with the fonts |
|
|
100 |
used for your X-windows/KDE/Gnome environment. |
1 |
perry |
101 |
|
3 |
IanMcDonald |
102 |
-hheader |
|
|
103 |
This is used only when the -p or -H switch is used and is passed |
|
|
104 |
as the "-h header" option to pr(1) or as the header for -H. |
1 |
perry |
105 |
|
3 |
IanMcDonald |
106 |
-H Create header line for each logical page separated from page |
|
|
107 |
text by a horizontal line. Unless -h is given, the header con- |
|
|
108 |
sist of last file modification time, filename and page number, |
|
|
109 |
all in bold and slightly larger font. This option only applies |
|
|
110 |
to non-postscript files. |
1 |
perry |
111 |
|
3 |
IanMcDonald |
112 |
-Iindent |
|
|
113 |
Indent text by indent characters. |
1 |
perry |
114 |
|
3 |
IanMcDonald |
115 |
-jfirst[-last][%interval] |
|
|
116 |
Print just the selected sheets, specified by a number, starting |
|
|
117 |
at 1. Here last defaults to the end of data, interval to 1. |
|
|
118 |
Several -j options can be given (upto MAXJARGS, default 100) to |
|
|
119 |
create a complex selection of pages. Thus -j1-10 selects the |
|
|
120 |
first 10 sheets, while -j 1%2 prints just the odd-numbered |
|
|
121 |
sheets and -j 2%2 prints just the even ones. |
1 |
perry |
122 |
|
3 |
IanMcDonald |
123 |
You can do double-sided printing, in two passes, as follows. If |
|
|
124 |
you use 3-hole punched paper, put it in the printer such that |
|
|
125 |
the holes will appear at the top of the page -- on the right as |
|
|
126 |
you pull out the printer tray, in our Laser writer II NTX. |
|
|
127 |
Print the odd-numbered sheets with |
1 |
perry |
128 |
|
3 |
IanMcDonald |
129 |
mpage ... -j 1%2 ... |
1 |
perry |
130 |
|
3 |
IanMcDonald |
131 |
Note the number of pages it reports. (Only half this many will |
|
|
132 |
really be printed). When printing finishes, if mpage reported |
|
|
133 |
an odd number of pages, remove the last one from the stack, |
|
|
134 |
since there will be no even-numbered sheet to match it. Then |
|
|
135 |
arrange the stack of paper for printing on the other side. (If |
|
|
136 |
it's punched, the holes will now be on the left.) On our II |
|
|
137 |
NTX, the paper comes out blank-side up; replace it in the tray |
|
|
138 |
still blank-side up but rotated 180 degrees. For other print- |
|
|
139 |
ers, you figure it out. Now print the even-numbered sheets in |
|
|
140 |
reverse order with |
1 |
perry |
141 |
|
3 |
IanMcDonald |
142 |
mpage ... -r -j 2%2 ... |
1 |
perry |
143 |
|
3 |
IanMcDonald |
144 |
hoping no one else reaches the printer before you do. |
1 |
perry |
145 |
|
|
|
146 |
|
3 |
IanMcDonald |
147 |
-Jstartpageno |
|
|
148 |
Set the start value of the sheet page count to startpageno |
|
|
149 |
instead of 1. |
1 |
perry |
150 |
|
|
|
151 |
|
3 |
IanMcDonald |
152 |
-k When mpage finds a %%TRailer or %%PSTrailer in the postscript |
|
|
153 |
input file it normally assumes this is the end of the postscript |
|
|
154 |
file and stops reading the input file. But when the PS file |
|
|
155 |
includes EPS files, %%Trailers might be anywhere. Using this |
|
|
156 |
option ignores the %%TRailer and %%PSTRailer lines. |
1 |
perry |
157 |
|
3 |
IanMcDonald |
158 |
-l Toggle printing landscape or portrait mode. Landscape pages are |
|
|
159 |
55 lines long by 132 characters wide by default. Portrait pages |
|
|
160 |
are 66 lines long by 80 characters wide by default. (default |
|
|
161 |
portrait.) |
1 |
perry |
162 |
|
3 |
IanMcDonald |
163 |
-Llines |
|
|
164 |
Adjust the page reduction parameters so that lines lines will |
|
|
165 |
fit in the space of one page. This overrides the default values |
|
|
166 |
normally supplied. (See -l.) If used in conjunction with -p |
|
|
167 |
then this value is passed to the pr(1) as well. As a side |
|
|
168 |
effect this changes the font size as well (as will the -W |
|
|
169 |
option.) So while there is an option to change font family, |
|
|
170 |
there is no explicit option to change font size! |
1 |
perry |
171 |
|
3 |
IanMcDonald |
172 |
-m[<num>[lrtb]*] |
|
|
173 |
Specify sheet margin. The default margin is 20 points. Only |
|
|
174 |
specifying -m sets left margin to 40 points. l, r, t or b set |
|
|
175 |
left, right, top or bottom margin respectively to <num> points. |
|
|
176 |
Not specifying any of the sides will set all sides when <num> is |
|
|
177 |
given. <num> defaults to 40 points. For example -m10 sets all |
|
|
178 |
margins to 10 points. -ml50tb sets left margin to default 40 |
|
|
179 |
and top and bottom margin to 50 points. -m50l25bt30r set bottom |
|
|
180 |
and top margin to 25, left margin to 50 and right margin to 30 |
|
|
181 |
points. Margins can have negative numbers. Very large values |
|
|
182 |
have funny effects. This is left as an exercise to the user. |
1 |
perry |
183 |
|
3 |
IanMcDonald |
184 |
-M[<num>[lrtb]*] |
|
|
185 |
Specify logical page margins. For syntax, see -m option. |
|
|
186 |
Defaults are 4 for -M solely, and 8 for <num>. Margins can be |
|
|
187 |
negative. This way large white borders in your (postscript) |
|
|
188 |
documents can be reduced. Very large values have funny effects. |
|
|
189 |
This is left as an exercise to the user. |
1 |
perry |
190 |
|
3 |
IanMcDonald |
191 |
-o Toggle printing of outlines around each reduced page (default |
|
|
192 |
on). |
1 |
perry |
193 |
|
3 |
IanMcDonald |
194 |
-O Print 2 normal pages per sheet. However, this option will print |
|
|
195 |
every first and fourth page of every set of four pages. This |
|
|
196 |
option will ignore -a and -l. See also the -E option. Using |
|
|
197 |
these options double sided prints can be created without a |
|
|
198 |
duplex printer. |
1 |
perry |
199 |
|
3 |
IanMcDonald |
200 |
-p[prprog] |
|
|
201 |
Pipe input through prprog command (including specified options) |
|
|
202 |
before printing (assumes the input is a text file). When no |
|
|
203 |
command is specified, it defaults to pr(1). |
1 |
perry |
204 |
|
3 |
IanMcDonald |
205 |
-P[printer] |
|
|
206 |
Specify the printer to which the PostScript output will be sent |
|
|
207 |
(e.g.lpr -Pprinter). Using -P with no printer specified will |
|
|
208 |
send the PostScript to the default printer queue (e.g. lpr). |
|
|
209 |
Using -P- will return output to stdout, useful in combination |
|
|
210 |
with MPAGE environment variable. Without -P output will be send |
|
|
211 |
to standard output. |
1 |
perry |
212 |
|
3 |
IanMcDonald |
213 |
-r Reverse printing. The last sheet is printed first. The way of |
|
|
214 |
arranging reduced pages on the sheets doesn't change. |
1 |
perry |
215 |
|
3 |
IanMcDonald |
216 |
-R Switch to left to right mode, starting first page on left bottom |
|
|
217 |
corner. This might be useful for landscape postscript files. |
|
|
218 |
(Note: using -l after -R undoes -R, and switches to normal land- |
|
|
219 |
scape mode. |
1 |
perry |
220 |
|
3 |
IanMcDonald |
221 |
-stabstop |
|
|
222 |
Set tabstop width (default 8 characters). Should by >= 2. |
1 |
perry |
223 |
|
3 |
IanMcDonald |
224 |
-S Accept non-square page reduction. By default, pages are shrunk |
|
|
225 |
equally in X and Y, even if this wastes some space on the sheet. |
|
|
226 |
With -S, reduced pages are larger but slightly distorted. (only |
|
|
227 |
used when printing postscript files.) |
1 |
perry |
228 |
|
3 |
IanMcDonald |
229 |
-t Toggle printing on both sides of the paper. This option has 3 |
|
|
230 |
states: nop, yes, no, which mean: NOP: |
|
|
231 |
dont do anything on PostScript, so printer default will be |
|
|
232 |
used; YES: |
|
|
233 |
force printer to do duplex; NO: force printer not to do it. If |
|
|
234 |
there is no -t, then the duplex is NOP. If you put some -t on |
|
|
235 |
the command line, the state toggles as "yes,no,yes,no...". So, |
|
|
236 |
if your printer is set to print, by default, in duplex mode, you |
|
|
237 |
will use "-t -t" on command line to force it to print in non- |
|
|
238 |
duplex mode. Use this option only if your printer is capable of |
|
|
239 |
printing in duplex mode. (default NOP). |
1 |
perry |
240 |
|
3 |
IanMcDonald |
241 |
-T Toggle tumble of every second pages. This option has 3 states: |
|
|
242 |
nop, yes, no (with behaviour similar to -t). So, if your |
|
|
243 |
printer is set to print, by default, in duplex mode, with tumble |
|
|
244 |
on, you will use "-T -T" on command line to print in nontumble |
|
|
245 |
mode. Use this option only if your printer is capable of print- |
|
|
246 |
ing in duplex mode. With this version of mpage, you may use |
|
|
247 |
this option even if you do not use -t. (default NOP.) |
1 |
perry |
248 |
|
3 |
IanMcDonald |
249 |
-u Toggle checking for UTF-8 input (not relevant for postscript |
|
|
250 |
input). |
1 |
perry |
251 |
|
3 |
IanMcDonald |
252 |
-U This option is deprecated, see -b. Prepare output for US Letter |
|
|
253 |
sized paper. For default see 'mpage -x'. |
1 |
perry |
254 |
|
3 |
IanMcDonald |
255 |
-v Toggle printing a count of the number of sheets produced for |
|
|
256 |
printing (default off.) |
1 |
perry |
257 |
|
3 |
IanMcDonald |
258 |
-V Print version information and exit. |
1 |
perry |
259 |
|
3 |
IanMcDonald |
260 |
-Wwidth |
|
|
261 |
Adjust the page reduction parameters so that a line with width |
|
|
262 |
characters long will fit in the space of one page. This over- |
|
|
263 |
rides the default values normally supplied. (See -l.) If used |
|
|
264 |
in conjunction with -p then this value is passed to the s pr(1) |
|
|
265 |
program as well. See also the -L option on font sizes. |
1 |
perry |
266 |
|
3 |
IanMcDonald |
267 |
-x Force usage display, which also shows current defaults. |
1 |
perry |
268 |
|
3 |
IanMcDonald |
269 |
-X [header] |
|
|
270 |
Print header on the left and the page number on the right of |
|
|
271 |
each physical page (sheet). If no header is given, the default |
|
|
272 |
is the current filename (note influence of -c), the filename of |
|
|
273 |
the first file on the page is used. |
1 |
perry |
274 |
|
3 |
IanMcDonald |
275 |
-zprintcommand |
|
|
276 |
Specify command to use to send output to. Default is lpr (1) |
|
|
277 |
for BSD style spooler, lp (1) for SYSV style spooler. You can |
|
|
278 |
specify command line options, but note -Z. For example -zlp for |
|
|
279 |
system V Unix. |
1 |
perry |
280 |
|
3 |
IanMcDonald |
281 |
-Zprintprog_queuename_arg |
|
|
282 |
Specify what option to use for the "-z printcommand" to specify |
|
|
283 |
a printqueue. For example -zlp -Z-d for system V Unix. Default |
|
|
284 |
is -P for BSD style spooler, -d for SYSV style spooler. |
1 |
perry |
285 |
|
3 |
IanMcDonald |
286 |
ENVIRONMENT |
|
|
287 |
mpage examines the PRINTER (or LPDEST for SYSV style spooler) environ- |
|
|
288 |
ment variable to override its default printer. |
1 |
perry |
289 |
|
3 |
IanMcDonald |
290 |
The MPAGE_LIB environment variable can be used to control where the |
|
|
291 |
character encoding files (-C) can be found. |
1 |
perry |
292 |
|
3 |
IanMcDonald |
293 |
mpage also examines the MPAGE environment variable for default option |
|
|
294 |
settings. Any option or combination of options can be specified in the |
|
|
295 |
MPAGE environment variable. For example, if MPAGE is set to the |
|
|
296 |
string: |
1 |
perry |
297 |
|
3 |
IanMcDonald |
298 |
-2oPqms -L60 |
1 |
perry |
299 |
|
3 |
IanMcDonald |
300 |
it would (in the absence of other command line arguments) print 2 pages |
|
|
301 |
per sheet, 60 lines per page, with outlines, on the printer named qms |
|
|
302 |
(overriding the PRINTER/LPDEST environment variable, if it exists.) In |
|
|
303 |
the environment variable, white space is used as an option delimiter, |
|
|
304 |
and no quoting is recognized. |
1 |
perry |
305 |
|
3 |
IanMcDonald |
306 |
Any command line options will override both the PRINTER and MPAGE envi- |
|
|
307 |
ronment variables. |
1 |
perry |
308 |
|
3 |
IanMcDonald |
309 |
FILES |
|
|
310 |
/tmp/mpageXXXXXX |
|
|
311 |
/usr/share/mpage |
1 |
perry |
312 |
|
3 |
IanMcDonald |
313 |
BUGS |
|
|
314 |
Suffers under the burden of far too many switches. (But you wanted the |
|
|
315 |
choices!) |
1 |
perry |
316 |
|
3 |
IanMcDonald |
317 |
NULL characters in a postscript input file will cause mpage to crash! |
1 |
perry |
318 |
|
3 |
IanMcDonald |
319 |
Many others, we're sure. |
1 |
perry |
320 |
|
3 |
IanMcDonald |
321 |
Mpage is year 2000 compliant, as long as the underlying operating sys- |
|
|
322 |
tem is!!! |
1 |
perry |
323 |
|
3 |
IanMcDonald |
324 |
VERSION |
|
|
325 |
Version 2.5.4, Released may 2004. |
|
|
326 |
Location: |
1 |
perry |
327 |
|
3 |
IanMcDonald |
328 |
http://www.mesa.nl/pub/mpage |
|
|
329 |
ftp://ftp.mesa.nl/pub/mpage |
1 |
perry |
330 |
|
3 |
IanMcDonald |
331 |
AUTHORS |
|
|
332 |
Marcel Mol <marcel@mesa.nl> (current maintainer). |
1 |
perry |
333 |
|
3 |
IanMcDonald |
334 |
Mark P. Hahn (Original author) |
|
|
335 |
</verbatim> |