Subject: pap (netatalk-asun-2.1.3) not properly closing?

From: Patrik Schindler <[email-masked]>
Date: Thu, 17 Feb 2000 19:47:16 +0100

Hello,

I'm trying to get the chain lpr -> lpd -> gs -> pap -> HP DeskWriter 510 to work.
At the moment it works very fine with my custom of:

#!/bin/sh
trap '' SIGINT
#
TMPFILE="/tmp/`date +%s`.tmp"
DDICT="-dSAFER -dNOPAUSE -dBATCH"
SDICT="-sPAPERSIZE=a4 -sDEVICE=djet500 -sOutputFile=$TMPFILE"
OPTS="-q"
#
/usr/bin/gs $OPTS $DDICT $SDICT -
/usr/local/bin/pap -e -sstatus < $TMPFILE
rm -f $TMPFILE

The redirection to a tempfile is another oddity (when piping the job directly from gs to pap, the printer feeds one page and than doesn't print anything.

What really hurts is: After sending the Job to the printer, it never gives up. Pap runs and uns and won't close the connection until it's explicitly killed. Bad thing.
Same setup (but without gs) runs absolutely problem-free with my QMS PS-410.

Is this a protocol related bug from HP or from pap?
Has anyone expirienced a similar problem?

:wq! PoC

---

From: [email-masked]
Date: Thu, 17 Feb 2000 18:20:17 -0500

> From:    Patrik Schindler <[email-masked]>
> To:      [email-masked]

> What really hurts is: After sending the Job to the printer, it never
> gives up. Pap runs and uns and won't close the connection until it's
> explicitly killed.  Bad thing.

Try using the (undocumented) "-E" option to pap.

> Has anyone expirienced a similar problem?

We have this same problem with HP printers in our charge-for printing
system.  During various points in the accounting procedure, we either
do or do not wait for the EOF from the printer.  Generally, HP and some
other products get confused when they receive a large or complex job
and forget to ever close the PAP connection.  During accounting, it's
important to wait for EOF, otherwise it's not.  "psf" knows this, and
gives the "-E" option to "pap" unless accounting is on.

:wes

---

From: Patrik Schindler <[email-masked]>
Date: Fri, 18 Feb 2000 07:27:42 +0100

At 18:20 Uhr -0500 17.02.2000, [email-masked] wrote:

>Generally, HP and some

Hm, I don't think, man -t rm is whether complex nor large ;-)

>gives the "-E" option to "pap" unless accounting is on.

-E is not documented in the PAP man page.
What exactly does it do? So I may send an update to Adrian that anyone can benefit who suffers from this condition.

Anyway, thank you VERY much for your Aid, -E helped.

:wq! PoC