SUMMARY: B size printcap entry needed for NeWSprinter 20

From: Douglas Chen (dougc@lsi.sel.sony.com)
Date: Sat Mar 04 1995 - 07:50:08 CST


----------
X-Sun-Data-Type: text
X-Sun-Data-Description: text
X-Sun-Data-Name: text
X-Sun-Content-Lines: 167

Hello,

Thanks to the following who replied (If I miss anyone, sorry)

dwc@cs.strath.ac.uk (David Crust)
du809@mfg.canadair.ca (Mario Dupuis)
bismark@alta.jpl.nasa.gov
stevee@sbei.com (Steve Ehrhardt)
shang@geng.aer.loral.com (Cynthia shang)
denali!rocky.alaska.opensys.COM!ken@rambone.psi.net (Kenneth P. Lamoreaux)

Since the majority B size printout is from Mac user, an entry is needed in the
/etc/printcap in order to be seen from Chooser. And the answer from Cynthia is
exactly what I need. It's working perfectly now. The others contained helpful
suggestions, I have attached them for your reference.

---------------------------------------------------------------------------------
*From David Crust:
Try creating a separate spool directory with a new printcap file entry. In
the new spool directory (eg NeWSprinter20B) edit the .param file to select the
printer tray that you want to use by default for this printer name.

NeWSprint should do file locking on the spd0 device so that only one queue
can print at once to the printer. I don't know what happens about timeout
errors, however.

(I don't have a NeWSprinter 20 so I can't confirm this, but assuming there
is a variable to set the paper tray it should be okay).
---------------------------------------------------------------------------------
*From Mario Dupuis
This works here, using an IPX with SUN/OS 4.1.3

The only drawbacks are:
1) A queue as to drain completely before the other one can start,

2) and you can only use the NeWSprint License on one of the queue.
So the other queue (the 11X17 in my case) will only have the
default fonts available, which is fine four me because the 11X17
is use to plot from AutoCad or Catia.

3) You also have to modify the .param file in each of the spool directory
to define the correct tray.

DEFAULTTRAY=tray2; export DEFAULTTRAY

# entry for a Sun NeWSprinter 20 NeWSprint printer on a video port
lp|8.5X11:\
        :lp=/dev/spd0:\
        :sd=/usr/local/printspool/lp:\
        :lf=/usr/local/printspool/lp/log:\
        :af=/usr/local/printspool/lp/acct:\
        :if=/usr/local/newsprint/lpd/if:\
        :gf=/usr/local/newsprint/lpd/gf:\
        :nf=/usr/local/newsprint/lpd/nf:\
        :tf=/usr/local/newsprint/lpd/tf:\
        :rf=/usr/local/newsprint/lpd/rf:\
        :vf=/usr/local/newsprint/lpd/vf:\
        :cf=/usr/local/newsprint/lpd/cf:\
        :df=/usr/local/newsprint/lpd/df:\
        :of=/usr/local/newsprint/lpd/of:\
        :mx#0:\
        :sf:\
        :sb:\
        :sh:

################################################################
# entry for a Sun NeWSprinter 20 NeWSprint printer on a video port
lm|11X17:\
        :lp=/dev/spd0:\
        :sd=/usr/local/printspool/lm:\
        :lf=/usr/local/printspool/lm/log:\
        :af=/usr/local/printspool/lm/acct:\
        :if=/usr/local/newsprint/lpd/if:\
        :gf=/usr/local/newsprint/lpd/gf:\
        :nf=/usr/local/newsprint/lpd/nf:\
        :tf=/usr/local/newsprint/lpd/tf:\
        :rf=/usr/local/newsprint/lpd/rf:\
        :vf=/usr/local/newsprint/lpd/vf:\
        :cf=/usr/local/newsprint/lpd/cf:\
        :df=/usr/local/newsprint/lpd/df:\
        :of=/usr/local/newsprint/lpd/of:\
        :mx#0:\
        :sf:\
        :sb:\
        :sh:

The postcript jobs that you want to be printed B-size
should be sent to a script that appends the following to
the front of the file, and then sends it to your
first printcap entry.

*From bismark@alta.jpl.nasa.gov
The postcript jobs that you want to be printed B-size
should be sent to a script that appends the following to
the front of the file, and then sends it to your
first printcap entry.
---------------------------------------------------------------------------------
*From Steve Ehrhardt
For most printers, there's a fairly simple way to do this. You define a
"dummy" printcap file that has lp set to a "/dev/null" equivalent. You
then create an input filter ("if=") which just pipelines the input sent
from lpd though whatever filters you wish, then pipes to "lpr -P realprinter".
(You have to be sure to make a "/dev/null" clone using mknod - if you link
it you'll just lock up one queue when you're accessing the other!)

I've used this approach enough that I have several canned scripts for this
purpose. I've attached a sample to this message, along with a printcap
entry for it. Please note that the printer device "PEAL" was made with
the command:

This works well enough in general, but what specific problems you might
encounter with a NeWSprinter I wouldn't know - I've never used one!

        mknod PEAL c 3 2

Hope this helps...
---------------------------------------------------------------------------------
*From Cynthia Shang
  We have several Newsprinter 20 here with 2 paper trays, the upper tray
holds A-size paper and the lower tray holds B-size paper. Assuming you
have similar setup, you can try the following steps to print to your
B-size tray:

   1. In /etc/printcap file, add the following lines
       
       lp1b|Newsprinter B-size:\
          :lp=/dev/null:\
          :sf:sh:sb:mx#0:\
          :sd=/var/spool/lp1b:\
          :lf=/var/spool/lp1b/error:\
          :st=/var/spool/lp1b/status:\
          :of=/var/spool/lp1b/lp1b_switch:

   2. Create file "/var/spool/lp1b/lp1b_switch" with the following lines:

       #!/bin/csh
       set path=(. /bin /usr/bin /usr/ucb /etc /usr/etc /usr/newsprint/bin)
       setenv PRINTER lp1
       cat - | pl :tray2 :res400

   Good luck!
---------------------------------------------------------------------------------
*From Kenneth P. Lamoreaux
I successfully setup a NeWSprinter20 to do exactly that. Just run add_np_printer
again for the same printer but give it a different name: NeWSprinter20_B

Then edit the .param for the second printer to default to the B size paper tray.

This worked well for a group in which some needed the printer for WordPerfect
and others used it for check plots from AutoCAD. The AutoCAD users just sent
there prints to the second printer entry for the NeWSprinter20.

Hope this helps!
---------------------------------------------------------------------------------

Douglas

   o__ ---- Douglas Chen
    ,>/_ ------ LSI Systems Lab.
     (_)`(_) ------- Sony Research Laboratories

Phone : (408)955-4570 Fax: (408)955-5180
email : dougc@lsi.sel.sony.com

----------
X-Sun-Data-Type: cshell-script
X-Sun-Data-Name: psif_example
X-Sun-Content-Lines: 13

#!/bin/csh -f

setenv PATH :/usr/bin:/usr/ucb:/etc:/usr/etc:.

onintr CLEANUP

set netprintfilter = "lpr -h -PPEAL"
set pscomm = /vol/printer/pscomm
set printer = PEAL

$pscomm | $netprintfilter

exit 0
----------
X-Sun-Data-Type: default
X-Sun-Data-Name: printcap_sample
X-Sun-Content-Lines: 10

1|netprint4|cad|lp|lw|dp|alw|dataprodpsa|dataprodpsb|ps|dataproducts_2665|\
netprint4 - 11x17 300 DPI fast PostScript, eng. printer rm:\
        :lp=/var/spool/1/PEAL:\
        :sd=/var/spool/1:\
        :lf=/var/spool/1/log:\
        :if=/vol/printer/psif_PEAL:\
        :rs:\
        :sh:\
        :mx#0:\
        :rw:



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:17 CDT