Debian Codegraph @

upstream/opensuse-tumbleweed/man1/pstops.1

raw
1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
2 .TH PSTOPS "1" "December 2021" "pstops 2.08" "User Commands"
3 .SH NAME
4 pstops - rearrange pages of a PostScript document
5 .SH SYNOPSIS
6 .B pstops
7 [\fI\,OPTION\/\fR...] [\fI\,INFILE \/\fR[\fI\,OUTFILE\/\fR]]
8 .SH DESCRIPTION
9 Rearrange pages of a PostScript document.
10 .PP
11 The input PostScript file should follow the Adobe Document Structuring
12 Conventions.
13 .PP
14 .I Pstops
15 can be used to perform arbitrary re-arrangements of documents. For many tasks,
16 it is simpler to use the other utilities in the PSUtils suite: see
17 .BR psutils (1).
18 .TP
19 \fB\-S\fR, \fB\-\-specs\fR=\fI\,SPECS\/\fR
20 page specifications (see below)
21 .TP
22 \fB\-R\fR, \fB\-\-pages\fR=\fI\,PAGES\/\fR
23 select the given page ranges
24 .TP
25 \fB\-e\fR, \fB\-\-even\fR
26 select even\-numbered output pages
27 .TP
28 \fB\-o\fR, \fB\-\-odd\fR
29 select odd\-numbered output pages
30 .TP
31 \fB\-r\fR, \fB\-\-reverse\fR
32 reverse the order of the output pages
33 .TP
34 \fB\-p\fR, \fB\-\-paper\fR=\fI\,PAPER\/\fR
35 output paper name or dimensions (WIDTHxHEIGHT)
36 .TP
37 \fB\-P\fR, \fB\-\-inpaper\fR=\fI\,PAPER\/\fR
38 input paper name or dimensions (WIDTHxHEIGHT)
39 .TP
40 \fB\-d\fR, \fB\-\-draw\fR[=\fI\,DIMENSION\/\fR]
41 draw a line of given width (relative to original
42 page) around each page [argument defaults to 1;
43 default is 0]
44 .TP
45 \fB\-b\fR, \fB\-\-nobind\fR
46 disable PostScript bind operators in prolog;
47 may be needed for complex page rearrangements
48 .TP
49 \fB\-q\fR, \fB\-\-quiet\fR
50 don't show page numbers being output
51 .TP
52 \fB\-\-help\fR
53 display this help and exit
54 .TP
55 \fB\-\-version\fR
56 display version information and exit
57 .PP
58 PAGES is a comma\-separated list of pages and page ranges.
59 .PP
60 Each may be a page number, or a page range of the form
61 .IB first \- last .
62 If
63 .I first
64 is omitted, the first page is assumed, and if
65 .I last
66 is omitted, the last page is assumed.
67 The prefix character \[oq]_\[cq] indicates that the page number is relative to the end
68 of the document, counting backwards.
69 If just this character with no page number is used, a blank page will be
70 inserted.
71 Page numbers refer to the pages as they occur in the file, starting
72 at one.
73 The actual page number in the document may be different.
74 .PP
75 PAGESPECS is a list of page specifications [default is "0", which
76 selects each page in its normal order].
77 .PP
78 Pagespecs have the following syntax:
79 .RS
80 .TP 12
81 .I pagespecs
82 =
83 .RI [ modulo\fB:\fP ] specs
84 .TP
85 .I specs
86 =
87 .IR spec [ \fB+\fPspecs | \fB,\fPspecs ]
88 .TP
89 .I spec
90 =
91 .RB [ - ] \fIpageno\fP [\fIturns\fP][ @\fIscale\fP ][ ( \fIxoff\fP , \fIyoff\fP ) ]
92 .TP
93 .I turns
94 =
95 .IR turn [ turns ]
96 .TP
97 .I turn
98 =
99 .BR L | R | U | H | V
100 .RE
101 .sp
102 .I modulo
103 is the number of pages in each block.
104 The value of
105 .I modulo
106 should be greater than 0; the default value is 1.
107 .PP
108 .I specs
109 are the page specifications for the pages in each block.
110 The value of the
111 .I pageno
112 in each
113 .I spec
114 should be between 0 (for the first page in the block) and \fImodulo\fR\-1
115 (for the last page in each block) inclusive.
116 If there is only one page specification,
117 the \fIpageno\fR (0) may be omitted.
118 .PP
119 The optional dimensions
120 .I xoff
121 and
122 .I yoff
123 shift the page by the specified amount.
124 .I xoff
125 and
126 .I yoff
127 may either be lengths (see
128 .BR psutils (1))
129 or followed by
130 .B "w"
131 or
132 .B "h"
133 to indicate a multiple of the output paper width or height.
134 .PP
135 The optional parameters
136 .BR L ,
137 .BR R ,
138 .BR U ,
139 .BR H ,
140 and
141 .B V
142 rotate the page left, right, or upside-down, and flip (mirror) the page
143 horizontally or vertically respectively.
144 The optional
145 .I scale
146 parameter scales the page by the fraction specified.
147 If the optional minus sign is specified, the page number is relative to the end of
148 the document, instead of the start.
149 .PP
150 Pages whose
151 .IR spec s
152 are separated by
153 .B +
154 will be merged into a single page; otherwise,
155 they will remain as separate pages.
156 .PP
157 The shift, rotation, and scaling are applied
158 to the PostScript transformation matrix
159 in that order, regardless of the order
160 in which they appear on the command line.
161 .PP
162 Paper size names are converted to dimensions using
163 .BR paper (1).
164 The output paper size, if set, is used (after scaling) to set the
165 clipping path for each page.
166 .SS "Exit status:"
167 .TP
168 0
169 if OK,
170 .TP
171 1
172 if arguments or options are incorrect, or there is some other problem
173 starting up,
174 .TP
175 2
176 if there is some problem during processing, typically an error reading or
177 writing an input or output file.
178 .SH EXAMPLES
179 To put two pages on one sheet of A4 paper, the pagespec to use is:
180 .sp
181 .ce
182 2:[email protected](21cm,0)[email protected](21cm,14.85cm)
183 .sp
184 To select all of the odd pages in reverse order, use:
185 .sp
186 .ce
187 2:-0
188 .sp
189 To re-arrange pages for printing 2-up booklets, use
190 .sp
191 .ce
192 4:[email protected](21cm,0)[email protected](21cm,14.85cm)
193 .sp
194 for the front sides, and
195 .sp
196 .ce
197 4:[email protected](21cm,0)[email protected](21cm,14.85cm)
198 .sp
199 for the reverse sides (or join them with a comma for duplex printing).
200 .SH AUTHOR
201 Written by Angus J. C. Duggan and Reuben Thomas.
202 .SH BUGS
203 .B pstops
204 does not accept all DSC comments.
205 .SH COPYRIGHT
206 Copyright \(co Reuben Thomas 2017\-2020.
207 Released under the GPL version 3, or (at your option) any later version.
208 .SH TRADEMARKS
209 .B PostScript
210 is a trademark of Adobe Systems Incorporated.
211 .SH "SEE ALSO"
212 .BR psutils (1),
213 .BR paper (1)