PSTOPS(1)
okay bestie, welcome to PSTOPS(1) β the manual page for pstops, and she is giving main-character Unix energy π
β¨
πΈ NAME πΈ
pstops β the page-shuffling icon of the PSUtils suite. She rearranges pages of a PDF or PostScript document, no cap.
β¨ SYNOPSIS β¨
pstops [OPTION...] [INFILE [OUTFILE]]
π¦ DESCRIPTION π¦
Rearrange pages of a PDF or PostScript document. PostScript files should follow the Adobe Document Structuring Conventions, periodt.
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 psutils(1).
INFILEβ-or noINFILEargument means standard input.OUTFILEβ-or noOUTFILEargument means standard output.
π OPTIONS π
-S SPECS,--specs SPECSβ page specifications (see below).-R PAGERANGE,--pages PAGERANGEβ select the given page ranges.-e,--evenβ select even-numbered output pages.-o,--oddβ select odd-numbered output pages.-r,--reverseβ reverse the order of the output pages.-p PAPER,--paper PAPERβ output paper name or dimensions (WIDTHxHEIGHT).-P INPAPER,--inpaper INPAPERβ input paper name or dimensions (WIDTHxHEIGHT).-d [DIMENSION],--draw [DIMENSION]β draw a line of given width (relative to original page) around each page [argument defaults to1pt; default is no line; width is fixed for PDF].-v,--versionβ show program's version number and exit.-q,--quietβ don't show progress.
π 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].
Pagespecs have the following syntax:
pagespecs = [modulo:]specs
specs = spec[+specs|,specs]
spec = [-]pageno[transform...][@scale][(xoff,yoff)]
transform = L|R|U|H|V
modulo is the number of pages in each block. The value of modulo should be greater than 0; the default value is 1.
specs are the page specifications for the pages in each block. The value of the pageno in each spec should be between 0 (for the first page in the block) and modulo-1 (for the last page in each block) inclusive. If there is only one page specification, the pageno (0) may be omitted.
The optional dimensions xoff and yoff shift the page by the specified amount. xoff and yoff may either be lengths (see psutils(1)) or followed by w or h to indicate a multiple of the output page width or height.
The optional transformations L, R, U, H, and 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 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.
Pages whose specs are separated by + will be merged into a single page; otherwise, they will remain as separate pages.
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.
Paper size names are converted to dimensions using paper(1). The output page size, if set, is used (after scaling) to set the clipping path for each page.
π EXAMPLES π
Wanna put two A or B series pages (e.g. A4 or B5) on one sheet of paper? The pagespec to use is:
2:0L@.7(1w,0)+1L@.7(1w,0.5h)
To select all of the odd pages in reverse order, use:
2:-0
To re-arrange pages for printing 2-up booklets, use:
4:-3L@.7(1w,0h)+0L@.7(1w,0.5h)
for the front sides, and:
4:1L@.7(1w,0h)+-2L@.7(1w,0.5h)
for the reverse sides, or, for long-edge duplex printing, join the two specs thus:
4:-3L@.7(1w,0h)+0L@.7(1w,0.5h),1L@.7(1w,0h)+-2L@.7(1w,0.5h)
For short-edge duplex, the incantation is:
4:-3L@.7(1w,0h)+0L@.7(1w,0.5h),1R@.7(0w,0.5h)+-2R@.7(0w,1h)
π AUTHOR π
(The original page leaves this section empty β no author listed, just vibes π«Ά)
π BUGS π
pstops does not accept all DSC comments.
this iconic little page is from psutils 3.3.17, dated 2026-09-08 β bye bestie, go rearrange some pages πβ¨
π¦ where this page comes from
- arch rolling: psutils 3.3.17-1 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms