SUMMARY: Printing AnswerBook files

Date: Mon Jan 16 1995 - 23:31:25 CST


Thanks for all the replies. There are a number of utilities which apply
themselves to this job, but I suspect that none will solve the problem that
I have, which is that my JL4Si WONT print these files, but the old LJ3Si will,
so its down to differences in the postscript engines. It must lie somewhere
in the 'grestore' procedure whach is all that separates the end of one page
from the beginning of the next. As I said previously, the first 3 pages are OK,
and then 'duplexmode' gets lost.

Being a pragmatist, I'm using the 3Si from now on, and I've passed the buck.
Our Postscript Guru is continuing to investigate.

Anyway, thanks to...

bern@TI.Uni-Trier.DE (Jochen Bern)
   (Who also has a problem with his LJ4Si) (Alan F Lundin)
   (Who submitted a Perl script for inserting 'duplexmode' in ps files.
    see below) (Brian Utterback)
   (Who pointed at 'pslpr', a program available from
Jeff Dorsz <jdorsz@RDataSys.COM>
   (Who suggested a program called hpdup ) (Paulo Licio de Geus)
   (Who submitted the short Bourne script below) (Robert D. Worsham)
   (Who suggested using HP`s JetAdmin software)

NB I didn't test either of the scripts below...
Gordon Robertson, Head of Systems, Aberdeen University Computing Centre
Tel +44(0)224 273340
E-Mail :
 ----- Cut Here ----- ------ Cut Here -----
# Assume each arguement is the name of a PS file, and we are in a pipeline to
# lpr. Make the files print double-sided.
sed '/^%%EndProlog/a\
statusdict begin true setduplexmode end
' $*
----- Cut Here ----- ------ Cut Here -----

NOTE: I didn't write this, so if it doesn't work, I don't know why.
--------------------------Cut Here-----------------------------

($progname)= $0 =~ /.*\/([^\/]*)/;
$usage="$progname [ filename ]";

$duplex="statusdict begin true setduplexmode end
         statusdict begin false settumble end\n";
$tumble="statusdict begin true setduplexmode end
         statusdict begin true settumble end\n";
$end= "statusdict begin false setduplexmode end\n";

require '';
die "$usage\n" if $opt_h;
die "$usage\n" if @ARGV >= 2;

if (@ARGV) {
        $filename=shift @ARGV;
        open(STDIN, $filename) || die "Can't open $filename";

if ($_ !~ /^%!PS-Adobe-[0-9]/) {
        print "%!PS-Adobe-1.0\n";
} else {
        print $_;

if ($opt_d) {
        print $duplex;
} elsif ($opt_D) {
        print $tumble;

while (<>) {

print $end;
--------------------------Cut Here-----------------------------

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:14 CDT