Here are a couple of scripts that I wrote two years ago. They are very
simple, but it took quite a while to figure-out all of the command-line
options that were needed. They rely upon the PSUtils package
(specifically, "pstops") to reformat your Postscript files. They are
hereby placed into the Public Domain in the hopes that they will be
useful to someone.
The first script (make_book) creates booklets, you know, a normal
letter-sized piece of paper turned landcape and folded in half, with all
of the pages stapled along the spine. You create a normal file (i.e. in
StarOffice), with normal portrait-oriented letter-sized pages (no
shrinking, no rotating). There is nothing about this document that is
special to making booklets, except that you might want to use a 14pt or
18pt font (it is going to be scaled-down), and: Make sure that the
number of pages is evenly divisible by four (4,8,12,16,24,...); add
extra blank pages if you have to. You can decide the best place to add
the blank pages. Maybe the page after your Title Page or after your
Table of Contents should be blank. After you have invoked some sort of
"Print to File" (simple in StarOffice and most other programs), you run
"make_book original.ps newfile.ps". The script: shrinks the page images
to fit on the half-page area, turns the paper orientation to landscape,
and re-shuffles your pages so that the left-hand side of the first sheet
of paper contains "page 24" and the right-hand side of the same sheet of
paper contains "page 1". The next sheet of paper contains "page 2" on
the left and "page 23" on the right, and so on. You can use "lpr" to
print this new Postscript file, or use "ps2pdf" to create an Acrobat
file (which you can even give to a Windoze user for printing!)
The second script (make_card) takes a four-page Postscript file (see
above on creating Postscript files from StarOffice and others). It
creates one of those cheesy four-fold greeting cards that PrintShop made
famous. Before folding, this is a normal sheet of paper, that contains
four "page images". The top two page images are upside-down. First you
fold the paper in half (so that 8.5" x 11" becomes 8.5" x 5.5"), then
you fold it in half again (to 4.25" x 5.5"). The make_card script
ensures that "page 1" of your StarOffice document is the front of the
card, "page 2" is the inside left panel of the card, "page 3" is the
inside right panel, and "page 4" is the back of the card. If you want a
more Hallmark-ish card, use make_book with a four-page source file (you
get a greeting card that is 8.5" x 5.5"). The best thing about the
cheesy four-fold card is that you don't have to print on both sides of
the paper to get a card with printing on all four panels. I wrote the
make_card script when my wife complained that Linux couldn't do what
PrintShop did.
If you are going to do this a lot (for printing, not PDF files), you
could even create new /etc/printcap entries that invoke the scripts (use
stdin/stdout, get rid of the "cat $1" and "> $2" parts). You could have
a printer named "booklet" and a printer named "greeting_card".
make_book:
#!/bin/sh
cat $1 | pstops -pletter -b
"4:1L@.7(8in,0)+-2L@.7(8in,.5h),-3L@.7(8in,0)+0L@.7(8in,.5h)" > $2
make_card:
#!/bin/sh
cat $1 | pstops -pletter -b
"4:3U@.5(1w,1h)+0U@.5(.5w,1h)+1@.5(0,0)+2@.5(.5w,0)" > $2
--ronan
This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:51:47 EDT