File: pstops.man

package info (click to toggle)
psutils 1.17.dfsg-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 796 kB
  • ctags: 605
  • sloc: ansic: 6,567; sh: 756; perl: 705; makefile: 639; lisp: 74
file content (172 lines) | stat: -rw-r--r-- 4,257 bytes parent folder | download | duplicates (3)
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
.TH PSTOPS 1 "PSUtils Release @RELEASE@ Patchlevel @PATCHLEVEL@"
.SH NAME
pstops \- shuffle pages in a PostScript file
.SH SYNOPSIS
.B pstops
[
.B \-q
] [
.B \-b
] [
.B \-w\fIwidth\fR
] [
.B \-h\fIheight\fR
] [
.B \-p\fIpaper\fR
] [
.B \-d\fIlwidth\fR
]
.I pagespecs
[
.I infile
[
.I outfile
] ]
.SH DESCRIPTION
.I Pstops
rearranges pages from a PostScript document, creating a new PostScript file.
The input PostScript file should follow the Adobe Document Structuring
Conventions.
.I Pstops
can be used to perform a large number of arbitrary re-arrangements of
Documents, including arranging for printing 2-up, 4-up, booklets, reversing,
selecting front or back sides of documents, scaling, etc.
.PP
.I pagespecs
follow the syntax:
.RS
.TP 12
.I pagespecs
.I = [modulo:]specs
.TP
.I specs
.I = spec[+specs][,specs]
.TP
.I spec
.I = [-]pageno[L][R][U][H][V][@scale][(xoff,yoff)]
.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.
.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.
The optional dimensions
.I xoff
and
.I yoff
shift the page by the specified amount.
.I xoff
and
.I yoff
are in PostScript's points, but may be followed by the units
.B "cm"
or
.B "in"
to convert to centimetres or inches, or the flag
.B "w"
or
.B "h"
to specify as a multiple of the width or height.
The optional parameters \fIL\fR, \fIR\fR, \fIU\fR, \fIH\fR and \fIV\fR
rotate the page left, right, or upside-down, and flip (mirror) page
horizontally or vertically.
The optional
.I scale
parameter scales the page by the fraction specified.
If the optional minus sign is specified, the page is relative to the end of
the document, instead of the start.

If page \fIspec\fRs are separated by
.B \+
the pages will be merged into one page; if they are separated by
.B ,
they will be on separate pages.
If there is only one page specification, with
.I pageno
zero, the \fIpageno\fR may be omitted.

The shift, rotation, and scaling are applied
to the PostScript transformation matrix
in that order regardless of which order
they appear on the command line.
The matrix accumulates the individual transformations.
The effect on the image is to first scale with respect to an origin
at the lower left corner, then rotate about the same origin, and
finally shift.
.PP
The
.I \-w
option gives the width which is used by the
.B "w"
dimension specifier, and the
.I \-h
option gives the height which is used by the
.B "h"
dimension specifier. These dimensions are also used (after scaling) to set the
clipping path for each page.
The 
.I \-p
option can be used as an alternative, to set the paper size to
.B a0, a1, a2, a3, a4, a5, b5, letter, legal, tabloid, statement,
executive, folio, quarto or
.B 10x14.
The default paper size is
.B @PAPER@.
.PP
The
.I \-b
option prevents any
.B bind
operators in the PostScript prolog from binding. This may be needed in cases
where complex multi-page re-arrangements are being done.
.PP
The
.I \-d
option draws a line around the border of each page, of the specified width.
If the \fIlwidth\fR parameter is omitted, a default linewidth of 1 point is
assumed. The linewidth is relative to the original page dimensions,
\fIi.e.\fR it is scaled up or down with the rest of the page.
.PP
Pstops normally prints the page numbers of the pages re-arranged; the
.I \-q
option suppresses this.
.SH EXAMPLES
This section contains some sample re-arrangements. To put two pages on one
sheet (of A4 paper), the pagespec to use is:
.sp
.ce
"2:0L@.7(21cm,0)+1L@.7(21cm,14.85cm)"
.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(21cm,0)+0L@.7(21cm,14.85cm)"
.sp
for the front sides, and
.sp
.ce
"4:1L@.7(21cm,0)+-2L@.7(21cm,14.85cm)"
.sp
for the reverse sides (or join them with a comma for duplex printing).
.SH AUTHOR
Copyright (C) Angus J. C. Duggan 1991-1995
.SH "SEE ALSO"
@MAN@
.SH TRADEMARKS
.B PostScript
is a trademark of Adobe Systems Incorporated.
.SH BUGS
.I Pstops
does not accept all DSC comments.