Subject: using pap(1) with networked DeskWriter560C ?

From: Bradley Carlson <[email-masked]>
Date: Wed, 21 Feb 1996 15:46:50 -0600 (CST)

Has anyone managed to spool to a Macintosh network-connected
DeskWriter560C (or any of its kin)?  I can create a file of raw printer
data using gs(1) and send it to such a DeskWriter560C using pap(1) (I
found that I have to add a ^Z to the end of the file to get the last page
to eject).  All pages print correctly; however, pap never exits, and
papstatus(1) reports the printer as "busy" forever.  When I eventuall kill
off pap, the printer stays "busy" for part of a minute, then returns to
its idle state. 

-Bradley Carlson

particulars:
 Linux 1.2.13 
 netatalk 1.3.3 (with 1.3.3b2 kernel patches)
 DEC EtherPower nic
 DeskWriter 560C connected to ethernet via Farallon Etherwave Mac adapter

---

From: Jay Pfaffman <[email-masked]>
Date: Thu, 22 Feb 1996 10:58:00 -0600

I've had similar problems printing to a LaserJet with my Linux box.
It doesn't seem to happen all the time, and I can't find any pattern
to the behavior.  So at least you know that it's not your
imagination. :-) 

Jay Pfaffman                           [email-masked]
+1-615-343-1720 (office)               +1-615-460-9299 (home) 
http://relax.ltc.vanderbilt.edu/~pfaffman/

---

From: Software Development <[email-masked]>
Date: Wed, 3 Jul 1996 10:32:19 -0500 (CDT)

> off pap, the printer stays "busy" for part of a minute, then returns to

I'm trying to do this myself with a DeskWriter 540 under MkLinux and
I see the same thing (except that the printer just disappears from the
network after it times out).  Has anyone managed to figure out what's
going on here?

Paul DuBois
[email-masked]

---

From: Software Development <[email-masked]>
Date: Wed, 3 Jul 1996 20:23:48 -0500 (CDT)

> network after it times out).  Has anyone managed to figure out what's

Well, I think I have it working now.  I cheated and looked at the
pap source code and discovered an undocumented -E flag that means
not to wait for the final protocol close from the device.  Evidently
it was put in there for printers that violate protocol.  Anyway, adding
it works to allow me to print to my DW 540 as a fake PostScript printer
using ghostscript (gs) to convert PostScript to DeskWriter-talk.

Here's the lpd input filter I use on my MkLinux box.  Any suggestions
for improvement welcome.

#!/bin/sh

# lpd input filter for DeskWriter 540 printer (may work for others)
# - assumes PostScript input is on stdin
# - assumes printer is named in .paprc in printer spool directory
# - uses pap -E to not wait for printer to do device close because
#   DeskWriter seems to violate protocol

PATH=/usr/local/atalk/bin:/usr/local/bin:/bin:$PATH
export PATH

gs -q -dNOPAUSE -sDEVICE=cdjcolor -sOutputFile=- - | pap -E