summaryrefslogtreecommitdiff
path: root/static/unix-v10/man8/postreverse.8
blob: 4b16537efd6162b67c1ffe77ac93a31ecaec50c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
.TH POSTREVERSE 8 local
.SH NAME
postreverse \- reverse the page order in a postscript file
.SH SYNOPSIS
.B postreverse
[ options ] [ file ]
.SH DESCRIPTION
.I Postreverse
reverses the page order in a minimally conforming PostScript
.I file
and writes the results on the standard output.
If no
.I file
is specified, the standard input is read.
The following
.I options
are understood:
.TP 1.0i
.BI \-o list
Select pages whose numbers are given in the comma-separated
.IR list .
The list contains single numbers
.I N
and ranges
.IB N1 \- N2.
A missing 
.I N1
means the lowest numbered page, a missing
.I N2
means the highest.
.TP 1.0i
.B \-r
Don't reverse the pages in
.I file.
.TP 1.0i
.BI \-T dir
Use
.I dir
as the temporary file directory when
reading from the standard input.
By default
.I dir
is set to /tmp.
.PP
.I Postreverse
can handle files the violate page independence,
provided all global definitions are bracketed by
\&\f(CW%%BeginGlobal\fP and \&\f(CW%%EndGlobal\fP
comments.
In addition files that mark the end of each page
with \&\f(CW%%EndPage: label ordinal\fP comments
will also reverse properly, provided the prologue and
trailer sections can be located.
If the end of the prologue isn't found, the entire
.I file
is copied, unmodified, to the standard output.
.PP
Since global definitions are pulled out of individual
pages and put in the prologue, the output file can be
minimally conforming, even if the input
.I file
wasn't.
.SH EXAMPLES
Select pages 1 to 100 from
.B file
and reverse the pages,
.PP
.RS
\f(CWpostreverse -o1-100 file\fP
.RE
.PP
Print 4 logical pages on each physical page
and reverse all the pages,
.PP
.RS
\f(CWpostprint -n4 file | postreverse\fP
.RE
.PP
Produce a minimally conforming file from output
generated by dpost without reversing the pages,
.PP
.RS
\f(CWdpost file | postreverse -r\fP
.RE
.PP
.SH DIAGNOSTICS
0 exit status is returned if
.I file
was successfully processed.
.SH BUGS
No attempt has been made to deal with redefinitions of global
variables or procedures.
If standard input is used, the input
.I file
will be read three times before being reversed.
.SH SEE ALSO
dpost(1), postprint(1), posttek(1), postbgi(1), postdmd(1)