ps2book - Format a PostScript file as booklet using psbook and pstops
ps2book [-bhnqtvcx] [-P|-d printer] [-f ff] [-F ff] [-p paper] [-m paper] [-s sig] [-o outfile] file1 [file2 [..]]
ps2book reads one or several (plain or gzipped) PostScript files and
rearranges the pages into a booklet. It is essentially a nontrivial
wrapper around the two utilities psbook(1)
and pstops(1)
by Angus Duggan.
If no file is given, ps2book acts as a filter on stdin and writes the result to stdin_book.ps (or sends it to the printer if this was specified).
By default, a PostScript duplex `cookie' is inserted into the file, so it will print in duplex mode on PostScript printers which are capable of doing so.
Even if input files are gzipped, the output is always uncompressed.
Show usage overview
Show only a one-line message for each processed file
Don't show output from psbook and pstops
Write output to file (allows for only one input file). The default output file name is the original one with `_book' spliced in before the suffix. Thus, without the `-o' option, text.ps would become text_book.ps.
Send output to printer. Like with a2ps, specifying the printer display starts up gv/ghostview to preview the result.
Use paper as input page size of the Postscript file(s). Supported values are `a4', `letter' and `letter-bk' (letter booklet format -- the format that when rotated and scaled by 0.707 will exactly fit on half a letter page).
Use paper as output paper size. Supported values are `a4' and `letter'.
Set signature size to sig, which must be a multiple of 4.
See psbook(1)
for details.
Don't print signatures but just 2 pages in 2up format. Useful if your document has only two pages, or if you don't have a duplex printer, but still want to use options like `-F'.
Tumble page (asks printer to do it). You won't see an effect with ghostscript.
Tumble page without relying on the printer. You will see the effect with ghostscript.
Set (linear) fill factor to ff. The fill factor defines the size of the bounding box relative to the medium size (see section PAPER SIZE).
If x and y dimensions lead to different magnification factors, the smaller one is chosen. Thus, with a fill factor of 1.0, the bounding box will fill the whole page in at least one direction.
Requires the document to have a %%BoundingBox:
or at least a
%%PageBoundingBox:
for the first page.
Like -f, but determines the bounding box using ghostscript's bbox
device.
Currently uses pages 2-5 for determining the bounding box, but this will
become switchable.
Do not insert the PostScript duplex `cookie'. Make sure to print the file in a duplex queue if you use this option.
Apply page clipping (uses pstops's default clipping box).
Avoid clipping of pages (use huge clipping box). Useful if you create a centerfold page as an overwide page followed by an empty one.
This is also needed with some paper sizes, so it is now the default setting and this option will disappear in the future.
Don't use ghostscript's -dSAFER option. This option should be avoided, but it is sometimes necessary to keep EPS ghostscript 7.07.1 from choking with `ps2book -F ff'.
Show version number.
The page size of the input file is determined in the following order
%%DocumentMedia:
[a2ps]
or %%BeginPaperSize
[dvips]);
The paper or medium size for printing is determined in the following order:
Set the default printer to use; will be overwritten by the -P option. If neither PS2BOOK_PRINTER nor the -P option are set, output is to a file.
As with -P, the virtual printer display previews the output via gv/ghostview.
Options to be prepended to the command-line options. E.g.
export PS2BOOK_OPTIONS='-T -F0.97' # (or setenv PS2BOOK_OPTIONS '-T -F0.97')
You can also use this variable instead of PS2BOOK_PRINTER for specifying a printer.
Will not work with embedded whitespace in options, i.e. PS2BOOK_OPTIONS='--output=``my file.ps''' will fail, how ever much you try to quote the space.
See Section PAPER SIZE.
See Section PAPER SIZE.
Wolfgang Dobler <Wolfgang [.] Dobler [at] kis.uni-freiburg.de>
pstops(1), psbook(1)
ps2book reads in the whole file (plus the uncompressed version, if the file is gzipped) and may use a lot of memory. Bad if your printer has more memory than your computer.
There can be no bugs in this program. By definition. Any problems are due to bad usage.
Please report any such cases of bad usage and I will try to fix them.