Adding Network Based Printer...
2007-12-24 19:21:00
I'm trying to add a printer to a newly configured sun box. I've
documented it the last time I did the procedure so that there wouldn't be
any problems, but of course that is not the case. I grabbed the tarball
for ghostscript and patched the source code to add the hpdj driver (better
pcl3+ support for the newer hp printers that aren't ps-based). Here's
what I documented to do, step-by-step:
(Adding a printer share so I can send jobs from this box to another box is
not an option because that other box will be going away in a bit, so it
will need to be setup to print via "raw-ip").
Printer Setup (Network/Ip Based/Raw Printing)
1. Clear out any printer setup/printer filters:
lpadmin -x all
lpfilter -x -f all
2. Add the printer:
(NOTE: The ip address listed in the dest variable has been masked, a
real/valid value is specified.)
lpadmin -p jet842f -i /usr/lib/lp/model/netstandard -v /dev/null \
-o dest=x.x.x.x:9100,protocol=tcp,nobanner -I postscript -T PS \
-D "Jetdirect/HP842/Low Quality/Fast" -A mail
3. Add the following line in replacement of the if statement for $FILTER:
FILTER="/usr/lib/lp/postscript/postreverse | /usr/local/bin/gs -q -dSAFER \
-dNOPAUSE -dBATCH -dQUIET -r300x300 -sDEVICE=hpdj -sColorMode=CMYK \
-sMediaType=0 -sModel=unspec -sPrintQuality=-1 -sOutputFile=- -"
4. Make the printer we just added the default, enable and accept for
print jobs, and check the status of the printer queue.
lpadmin -d jet842f; enable jet842f; accept jet842f; lpstat -p jet842f
4. Add Print filters:
Verify there are no print filters: lpfilter -f all -l
cd /etc/lp/fd
for filter in *.fd;do
name=`basename $filter .fd`
lpfilter -f $name -F $filter
done
Note:
Make sure that the fonts directory for ghostscript is installed in
/usr/local/share/ghostscript/fonts otherwise ghostscript will not work!
---end of documentation
The printer interface is configured via bootp and has been tested by
telnetting to port 9100. When jobs get sent, the print spooler accepts
the job but then I'll get the following error message via email shortly
thereafter:
>From lp Thu Feb 8 00:48:37 2001
Received: (from lp at localhost)
by host.some.net (8.9.3+Sun/8.9.1) id AAA07491
for ryan; Thu, 8 Feb 2001 00:48:37 -0500 (EST)
Date: Thu, 8 Feb 2001 00:48:37 -0500 (EST)
From: Line Printer Admin <lp>
Message-Id: <200102080548.AAA07491 at host.some.net>
Subject: Status of lp request jet842f-19
Content-Type: text
Content-Length: 417
Your request jet842f-19 destined for jet842f
The job title was: test.ps
submitted from: host
at: Thu Feb 8 00:48:36 2001
encountered an error while printing on printer jet842f.
Printing stopped with an exit code of 1.
Reason for failure:
UX:lp:6 WARNING: cannot read temporary file ""
TO FIX: see if file still exists,
or consult your system administrator;
printing continues
Any ideas as to why lp can't do anything with the file promptly following
the queueing. I know it is already getting processed by the filter
because the error message you see above is performed when the job is
really ready to get sent to the printer, so something is getting lost in
between never-never land.
Please advise. Thank you for everyone's assistance in advance. I will
post with a follow up as to what the solution is.
Regards,
Ryan
Comments
Got something to say?
You must be logged in to post a comment.

