On 6/10/06, Urivan Saaib <[EMAIL PROTECTED]> wrote:
Hi Tracy,

This is the script I use to print book-style documents (both page sides and
2 or 4 document pages per sheet)

Regards,



#!/bin/sh
if [ -z "$@" ]; then
    printf "I need the file name."
    exit 1
fi

/usr/bin/psbook $1 ~/tmp/reordered.ps
/usr/bin/psnup -2 -l -m0.0in -pletter -Pletter ~/tmp/reordered.ps booklet_$1
rm -f ~/tmp/reordered.ps
if [ "$TERM" = "xterm" ]; then
    gv booklet_$1
    rm -f booklet_$1
fi

Since both psbook and psnup are proper Unix filters (read from stdin,
write to stdout) there is no need for the intermediate file
"reordered.ps".  It can all be done in a pipeline.

  /usr/bin/psbook $1 | /usr/bin/psnup -2 -l -m0.0in -pletter -Pletter
booklet_$1

I think that the default page size is "letter" so you don't need to
specify that either.  But this is probably installation-dependent, and
different if you live in a metric country.

   carl
--
   carl lowenstein         marine physical lab     u.c. san diego
                                                [EMAIL PROTECTED]


--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to