672 xargs doesn't support -0
[illumos-gate.git] / usr / src / man / man1 / postreverse.1
blobf514561cffe1b8d5aa362432c730367ee8e823c4
1 '\" te
2 .\"  Copyright 1989 AT&T  Copyright (c) 1996 Sun Microsystems, Inc.  All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH POSTREVERSE 1 "Sep 9, 1996"
7 .SH NAME
8 postreverse \- reverse the page order in a PostScript file
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBpostreverse\fR [\fB-o\fR \fIlist\fR] [\fB-r\fR] [\fIfile\fR]
13 .fi
15 .LP
16 .nf
17 \fB/usr/lib/lp/postscript/postreverse\fR
18 .fi
20 .SH DESCRIPTION
21 .sp
22 .LP
23 The \fBpostreverse\fR filter reverses the page order in files that conform to
24 Adobe's Version 1.0 or Version 2.0 file structuring conventions, and writes the
25 results on the standard output. Only one input \fBfile\fR is allowed and if no
26 \fBfile\fR is specified, the standard input is read.
27 .sp
28 .LP
29 The \fBpostreverse\fR filter can handle a limited class of files that violate
30 page independence, provided all global definitions are bracketed by
31 \fB%%BeginGlobal\fR and \fB%%EndGlobal\fR comments. In addition, files that
32 mark the end of each page with \fB%%EndPage: label ordinal\fR comments will
33 also reverse properly, provided the prologue and trailer sections can be
34 located. If \fBpostreverse\fR fails to find an \fB%%EndProlog\fR or
35 \fB%%EndSetup\fR comment, the entire \fBfile\fR is copied, unmodified, to the
36 standard output.
37 .sp
38 .LP
39 Because global definitions are extracted from individual pages and put in the
40 prologue, the output file can be minimally conforming, even if the input
41 \fBfile\fR was not.
42 .SH OPTIONS
43 .sp
44 .ne 2
45 .na
46 \fB\fB-o\fR\fI list\fR\fR
47 .ad
48 .RS 11n
49 Select pages whose numbers are given in the comma-separated \fIlist\fR. The
50 \fIlist\fR contains single numbers \fIN\fR and ranges \fIN1 \fR\(mi \fIN2\fR. A
51 missing \fIN1\fR means the lowest numbered page, a missing \fIN2\fR means the
52 highest. The page range is an expression of logical pages rather than physical
53 sheets of paper. For example, if you are printing two logical pages to a sheet,
54 and you specified a range of \fB4\fR, then two sheets of paper would print,
55 containing four page layouts. If you specified a page range of \fB3-4\fR, when
56 requesting two logical pages to a sheet; then \fIonly\fR page 3 and page 4
57 layouts would print, and they would appear on one physical sheet of paper.
58 .RE
60 .sp
61 .ne 2
62 .na
63 \fB\fB-r\fR\fR
64 .ad
65 .RS 11n
66 Do not reverse the pages in \fBfile\fR.
67 .RE
69 .SH EXAMPLES
70 .LP
71 \fBExample 1 \fRExamples of \fBpostreverse\fR.
72 .sp
73 .LP
74 o select pages 1 to 100 from \fBfile\fR and reverse the pages:
76 .sp
77 .in +2
78 .nf
79 \fBexample% postreverse \fR\fB-o1\fR\fB\(mi100 \fR\fBfile\fR
80 .fi
81 .in -2
82 .sp
84 .sp
85 .LP
86 To print four logical pages on each physical page and reverse all the pages:
88 .sp
89 .in +2
90 .nf
91 \fBexample% postprint \fR\fB-n4\fR\fB \fR\fBfile\fR | postreverse
92 .fi
93 .in -2
94 .sp
96 .sp
97 .LP
98 To produce a minimally conforming file from output generated by \fBdpost\fR
99 without reversing the pages:
102 .in +2
104 \fBexample% dpost \fR\fBfile\fR | postreverse \fB-r\fR
106 .in -2
109 .SH EXIT STATUS
112 The following exit values are returned:
114 .ne 2
116 \fB\fB0\fR\fR
118 .RS 12n
119 Successful completion.
123 .ne 2
125 \fBnon-zero\fR
127 .RS 12n
128 An error occurred.
131 .SH SEE ALSO
134 \fBdownload\fR(1), \fBdpost\fR(1), \fBpostdaisy\fR(1), \fBpostdmd\fR(1),
135 \fBpostio\fR(1), \fBpostmd\fR(1), \fBpostprint\fR(1), \fBposttek\fR(1),
136 \fBattributes\fR(5)
137 .SH NOTES
140 No attempt has been made to deal with redefinitions of global variables or
141 procedures. If standard input is used, the input \fBfile\fR will be read three
142 times before being reversed.