Admins,
the problem seems to be solved now:
I configured lp1 (normal hp queue),
configured lp2 (the filtering stuff) as:
lp2|2|hp2:\
:lf=/usr/adm/lp2err:\
:lp=/dev/null:\
:if=/var/spool/lpd2/pclfilter:\
:sd=/usr/spool/lpd2:
for lp1 you should set rp to
:rp=text:\
to fix the stairstepping.
in /var/spool/lpd2/pclfilter is:
#!/bin/sh
/bin/cat /var/spool/lpd2/pcl - | lp -d lp16
in /var/spool/lpd2 is:
^[18H ------> THIS IS WERE IT WENT WRONG:
------> It shouldn't be 18 (eighteen) but l
8: lowercase L - eight :-(
------> Thx to Richard N. Frank's reply
where the ^[ stands for the correct escape char,
entered by hitting <ctrl>v and then the <esc> key
Print the job to lp2: it works fine!
Regards,
Alex
BTW: a reset code does not seem to be nessecary...
-----Original Message-----
From: Alex Harkema [mailto:HarkemaA_at_vertis.nl]
Sent: Friday, July 07, 2000 2:47 PM
To: 'tru64-unix-managers_at_ornl.gov'
Cc: 'gaward_at_cssip.edu.au'
Subject: SUMMARY - different printer trays (not solved, yet though)
Hi All,
My original question was how to print to the different trays from a hp4050
LaserJet printer. Again, this list didn't let me down.
Unfortunately, I was not able to get it all right...I guess there is
something inside the printer that tells him to first use all the paper in
tray three and when ran out of paper, go on with tray two...
Is there any way to solve this, for this particular printer? The only
difference between tray two and three is the color of the paper.
This is the list's output, for which I am very greatfull! Thanx all
Bruce Senn [sennb_at_union.edu] said:
>From what I know, you cannot do this with native DEC lpr, because there is
no way to specify an escape sequence to send to the printer. You can
write your own print filter, which will find escape sequences in a file
somewhere, send them off to the printer, and then send the printfile.
He also referred to a product called Easy Spooler.
Octave Orgeron [unixconsole_at_yahoo.com] wrote:
I have tried this on my Lexmark
laser printer ( Sparcprinter E ) with the Advanced
Printing package. It works extremely well. I have
setup so that the top tray is for legal sized paper
and the bottom is for letter. The gui's that come with
the Advanced Printing package are very easy to use.
Ernie LaBonte [labonte_at_zk3.dec.com] told me
The preferred method would be to use the 'lpr -I' option for tray
selection. To select the tray in the printcap entry you would use
something similar to:
:if=/usr/lbin/PrintFilter -IUpperTray:\
A more complete printcap example:
lp|lp0|0:\
:ct=tcp:\
:af=/usr/adm/lpacct_lp0:\
:if=/usr/lbin/PrintFilter -IUpperTray:\
:lf=/usr/adm/lperr_lp0:\
:lp=_at_hp4050/port_9100:\
:mx#0:\
:of=/usr/lbin/PrintFilter:\
:pl#66:\
:pw#80:\
:sd=/usr/spool/print/lp0:\
:xf=/usr/lbin/xf:
The solution closest to my own experiences came from richard n. frank
[rnfrank_at_wolfram.llnl.gov] He explained
how to set up a postscript queue:
I have never discovered an easier way of tailoring a printer on
unix. You could do the same sort of thing for any tailoring you
want to do (i.e. special fonts, wrapping lines, plotting, whatever).
I am real familiar with pcl (HP's printer control language). It is
popular but not omnipresent.
okay, this here is what I did to use different output trays.
configure lp1 (normal hp queue)
configure lp2 (the filtering stuff) as:
lp2|2|hp2:\
:lf=/usr/adm/lp2err:\
:lp=/dev/null:\
:if=/var/spool/lpd2/pclfilter:\
:sd=/usr/spool/lpd2:
for lp1 you should set rp to
:rp=text:\
to fix the stairstepping.
in /var/spool/lpd2/pclfilter is:
#!/bin/sh
/bin/cat /var/spool/lpd2/pcl - | lp -d lp16
in /var/spool/lpd2 is:
^[18H
where the ^[ stands for the correct escape char,
entered by hitting <ctrl>v and then the <esc> key
Print the job to lp2.
This attaches the file pcl to the front of the file and sends it to lp1
You might consider putting a reset code
echo "\033E" -- or something alike?
at the end of the lp1 filter.
Otherwise, everything sent to lp1 will have the pcl code attached.
I also found:
http://cssweb.nectech.com/sscript/pcl3p.htm -this url contains lots of pcl
codes/commands.
Kind regards,
Alex Harkema
harkemaa_at_vertis.nl
Received on Mon Jul 10 2000 - 08:55:25 NZST