summaryrefslogtreecommitdiffstats
path: root/upstream/archlinux/man1/pstops.1
blob: 7f1d6ba7485c04425a01d94e884f4da58f44e6c1 (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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
.TH PSPDFUTILS "1" "2024\-04\-08" "pspdfutils 3.3.2" "User Commands"
.SH NAME
pspdfutils
.SH SYNOPSIS
.B pspdfutils
[OPTION...] [INFILE [OUTFILE]]
.SH DESCRIPTION
Rearrange pages of a PDF or PostScript document.
PostScript files should follow the Adobe Document Structuring
Conventions.
.PP
.I Pstops
can be used to perform arbitrary re-arrangements of documents. For many tasks,
it is simpler to use the other utilities in the PSUtils suite: see
.BR psutils (1).

.TP
\fBINFILE\fR
`\-' or no INFILE argument means standard input

.TP
\fBOUTFILE\fR
`\-' or no OUTFILE argument means standard output

.SH OPTIONS
.TP
\fB\-S\fR \fI\,SPECS\/\fR, \fB\-\-specs\fR \fI\,SPECS\/\fR
page specifications (see below)

.TP
\fB\-R\fR \fI\,PAGERANGE\/\fR, \fB\-\-pages\fR \fI\,PAGERANGE\/\fR
select the given page ranges

.TP
\fB\-e\fR, \fB\-\-even\fR
select even\-numbered output pages

.TP
\fB\-o\fR, \fB\-\-odd\fR
select odd\-numbered output pages

.TP
\fB\-r\fR, \fB\-\-reverse\fR
reverse the order of the output pages

.TP
\fB\-p\fR \fI\,PAPER\/\fR, \fB\-\-paper\fR \fI\,PAPER\/\fR
output paper name or dimensions (WIDTHxHEIGHT)

.TP
\fB\-P\fR \fI\,INPAPER\/\fR, \fB\-\-inpaper\fR \fI\,INPAPER\/\fR
input paper name or dimensions (WIDTHxHEIGHT)

.TP
\fB\-d\fR \fI\,[DIMENSION]\/\fR, \fB\-\-draw\fR \fI\,[DIMENSION]\/\fR
draw a line of given width (relative to original
page) around each page [argument defaults to 1pt;
default is no line; width is fixed for PDF]

.TP
\fB\-v\fR, \fB\-\-version\fR
show program's version number and exit

.TP
\fB\-q\fR, \fB\-\-quiet\fR
don't show progress

.SH COMMENTS
PAGES is a comma\-separated list of pages and page ranges.

SPECS is a list of page specifications [default is "0", which selects
each page in its normal order].
.PP
Pagespecs have the following syntax:
.RS
.TP 12
.I pagespecs
=
.RI [ modulo\fB:\fP ] specs
.TP
.I specs
=
.IR spec [ \fB+\fPspecs | \fB,\fPspecs ]
.TP
.I spec
=
.RB [ - ] \fIpageno\fP [\fItransform...\fP][ @\fIscale\fP ][ ( \fIxoff\fP , \fIyoff\fP ) ]
.TP
.I transform
=
.BR L | R | U | H | V
.RE
.sp
.I modulo
is the number of pages in each block.
The value of
.I modulo
should be greater than 0; the default value is 1.
.PP
.I specs
are the page specifications for the pages in each block.
The value of the
.I pageno
in each
.I spec
should be between 0 (for the first page in the block) and \fImodulo\fR\-1
(for the last page in each block) inclusive.
If there is only one page specification,
the \fIpageno\fR (0) may be omitted.
.PP
The optional dimensions
.I xoff
and
.I yoff
shift the page by the specified amount.
.I xoff
and
.I yoff
may either be lengths (see
.BR psutils (1))
or followed by
.B "w"
or
.B "h"
to indicate a multiple of the output page width or height.
.PP
The optional transformations
.BR L ,
.BR R ,
.BR U ,
.BR H ,
and
.B V
rotate the page left, right, or upside-down around its lower left corner,
and flip (mirror) the page horizontally or vertically respectively.
The optional
.I scale
parameter scales the page by the factor specified.
If the optional minus sign is specified, the page number is relative to the end of
the document, instead of the start.
.PP
Pages whose
.IR spec s
are separated by
.B +
will be merged into a single page; otherwise,
they will remain as separate pages.
.PP
The shift, rotation, and scaling are applied
to the PostScript transformation matrix
in that order, regardless of the order
in which they appear on the command line.
.PP
Paper size names are converted to dimensions using
.BR paper (1).
The output page size, if set, is used (after scaling) to set the
clipping path for each page.
.SH EXAMPLES
To put two A or B series pages (e.g. A4 or B5) on one sheet of paper, the pagespec to use is:
.sp
.ce
2:0L@.7(1w,0)+1L@.7(1w,0.5h)
.sp
To select all of the odd pages in reverse order, use:
.sp
.ce
2:-0
.sp
To re-arrange pages for printing 2-up booklets, use
.sp
.ce
4:-3L@.7(1w,0h)+0L@.7(1w,0.5h)
.sp
for the front sides, and
.sp
.ce
4:1L@.7(1w,0h)+-2L@.7(1w,0.5h)
.sp
for the reverse sides, or, for long-edge duplex printing, join the two specs thus:
.sp
.ce
4:-3L@.7(1w,0h)+0L@.7(1w,0.5h),1L@.7(1w,0h)+-2L@.7(1w,0.5h)
.sp
For short-edge duplex, the incantation is:
.sp
.ce
4:-3L@.7(1w,0h)+0L@.7(1w,0.5h),1R@.7(0w,0.5h)+-2R@.7(0w,1h)
.sp

.SH AUTHOR
.nf
.SH BUGS
.B pstops
does not accept all DSC comments.
.fi