1PSTOPS(1)                   General Commands Manual                  PSTOPS(1)
2
3
4

NAME

6       pstops - shuffle pages in a PostScript file
7

SYNOPSIS

9       pstops  [-q] [-b] [-wwidth] [-hheight] [-ppaper] [-d[lwidth]] pagespecs
10       [infile [outfile]]
11

DESCRIPTION

13       Pstops rearranges pages from a  PostScript  document,  creating  a  new
14       PostScript  file.   The  input  PostScript file should follow the Adobe
15       Document Structuring Conventions.  Pstops can  be  used  to  perform  a
16       large  number  of  arbitrary  re-arrangements  of  Documents, including
17       arranging for printing 2-up, 4-up, booklets, reversing, selecting front
18       or back sides of documents, scaling, etc.
19
20       pagespecs follow the syntax:
21
22              pagespecs   = [modulo:]specs
23
24              specs       = spec[+specs|,specs]
25
26              spec        = [-]pageno[L|R|U][H|V][@scale][(xoff,yoff)]
27
28       modulo is the number of pages in each block. The value of modulo should
29       be greater than 0; the default value is 1.  specs are the page specifi‐
30       cations  for  the  pages in each block. The value of the pageno in each
31       spec should be between 0 (for the first page in the block) and modulo-1
32       (for  the  last page in each block) inclusive.  The optional dimensions
33       xoff and yoff shift the page by the specified amount.   xoff  and  yoff
34       are  in  PostScript's points, but may be followed by the units cm or in
35       to convert to centimetres or inches, or the flag w or h to specify as a
36       multiple  of  the width or height.  The optional parameters L, R, R, R,
37       and V rotate the page left, right, or upside-down,  and  flip  (mirror)
38       page  horizontally  or vertically.  The optional scale parameter scales
39       the page by the fraction specified.  If  the  optional  minus  sign  is
40       specified,  the page is relative to the end of the document, instead of
41       the start.
42
43       If page specs are separated by + the pages  will  be  merged  into  one
44       page;  if  they  are separated by , they will be on separate pages.  If
45       there is only one page specification, with pageno zero, the pageno  may
46       be omitted.
47
48       The  shift,  rotation, and scaling are applied to the PostScript trans‐
49       formation matrix in that order regardless of which order they appear on
50       the  command  line.   The matrix accumulates the individual transforma‐
51       tions.  The effect on the image is to first scale with  respect  to  an
52       origin at the lower left corner, then rotate about the same origin, and
53       finally shift.
54
55       The -w option gives the width which is used by the w  dimension  speci‐
56       fier,  and the -h option gives the height which is used by the h dimen‐
57       sion specifier. These dimensions are also used (after scaling)  to  set
58       the  clipping  path  for  each  page.   The -p option can be used as an
59       alternative, to set the paper size. See paper(1).
60
61       The -b option prevents any bind operators in the PostScript prolog from
62       binding.  This  may  be  needed  in  cases where complex multi-page re-
63       arrangements are being done.
64
65       The option draws a line around the border of each page, of  the  speci‐
66       fied width.  If the lwidth parameter is omitted, a default linewidth of
67       1 point is assumed. The linewidth is  relative  to  the  original  page
68       dimensions, i.e., it is scaled up or down with the rest of the page.
69
70       Pstops  normally  prints the page numbers of the pages re-arranged; the
71       -q option suppresses this.
72

EXAMPLES

74       This section contains some sample re-arrangements. To put two pages  on
75       one sheet (of A4 paper), the pagespec to use is:
76
77                        "2:0L@.7(21cm,0)+1L@.7(21cm,14.85cm)"
78
79       To select all of the odd pages in reverse order, use:
80
81                                        2:-0
82
83       To re-arrange pages for printing 2-up booklets, use
84
85                       "4:-3L@.7(21cm,0)+0L@.7(21cm,14.85cm)"
86
87       for the front sides, and
88
89                       "4:1L@.7(21cm,0)+-2L@.7(21cm,14.85cm)"
90
91       for the reverse sides (or join them with a comma for duplex printing).
92

AUTHOR

94       Written by Angus J. C. Duggan.
95

SEE ALSO

97       psutils(1)
98

TRADEMARKS

100       PostScript is a trademark of Adobe Systems Incorporated.
101

BUGS

103       Pstops does not accept all DSC comments.
104
105
106
107                                    PSUtils                          PSTOPS(1)
Impressum