Subject: [netatalk-admins] SUMMARY: Printing to LocalTalk DeskJet

From: Tim Buller <[email-masked]>
Date: Thu, 26 Feb 1998 13:49:56 -0600 (CST)

Just a brief summary of how I setup a queue on a Solaris 2.5.1 host for an
LocalTalk connected HP DeskJet 870Cxi using stock netatalk 1.4b2.

1) First, create the printer as a normal postscript printer:

# /usr/sbin/lpadmin -p dj870 -v /dev/null -I postscript -T PS

2) Use the interface script from netatalk:

# /usr/sbin/lpadmin -p dj870 -i /usr/local/atalk/etc/lp2pap.sh

3) Put the NBP name of the printer into the appropriate .paprc file:

# echo "DeskJet 870C in 405B:DeskWriter@Math" > \
/etc/lp/printers/dj870/.paprc

4) Change the print command line in /etc/lp/interfaces/dj870 from:

    /usr/local/atalk/bin/pap "$6"

to:

    /usr/local/bin/gs -q -dNOPAUSE -sDEVICE=cdj550 \
	-sOutputFile='|/usr/local/atalk/bin/pap -E' "$6" -c quit 2>/dev/null

The '-E' on pap is important, otherwise, no EOF gets sent. STDERR is
directed to /dev/null because jobs spooled via Samba were printing out two
extra lines on a different page after the job had completed.

5) Bring the printer up

/usr/sbin/accept dj870
/bin/enable dj870

That's it! If you have problems, or if I missed something obvious, let me
know. A better way to do this might be to setup a filter named PCL or
something using ghostscript and tell the printer to use Content-type PCL,
but this seemed a little too fancy for what I was trying to do.

	Tim

====
Tim Buller                                       [email-masked]
Systems Specialist                       Snow Hall 643, (785) 864-7311
Department of Mathematics     University of Kansas, Lawrence, KS 66045