[comp.sys.apollo] postscript printers using lpr-'sh' doesn't work

kwongj@caldwr.caldwr.gov (James Kwong) (03/08/88)

This discussion of the 'sh' field for the printcap file, has it been tested?
This feature has never work for us. Below is our entry for our postscript
printer. You would think that  printer 'ps' would work, but it doesn't.
The header page always get printed. (Am I missing something from the 
printcap file?)

You have to do a 'lpr -h -P ps postscript_file' to get the 'prf' to suppress
the header page. 

For the heck of it, I've even try out printer 'test', same result.

-------------/etc/printcap-----------------------------------
.
.
.
ps|PostScript Enginee:\
        :pc=/com/prf -s //bear -pr lz -transparent -post:lp=/dev/null:\
        :sd=/usr/spool/lpd/ps:if=/usr/lib/lpf:\
        :sh=true:\
        :af=/usr/adm/lpacct:lf=/usr/adm/lpd-errs:
test|PostScript Enginee:\
        :pc=/com/prf -s //bear -pr lz -transparent -post:lp=/dev/null:\
        :sd=/usr/spool/lpd/ps:if=/usr/lib/lpf:\
        :sh=false:\
        :af=/usr/adm/lpacct:lf=/usr/adm/lpd-errs:
.
.
.
-- 
James Kwong  Calif. Depart. of H2O Resources, Sacramento, CA 95802
caldwr!kwongj@ucdavis.edu(Internet) ...!ucbvax!ucdavis!caldwr!kwongj (UUCP)
The opinions expressed above are mine, not those of the State of California or the California Department of Water Resources.

weber_w@apollo.uucp (Walt Weber) (03/09/88)

In article <315@caldwr.caldwr.gov> kwongj@caldwr.caldwr.gov (James Kwong) writes:
>
>This discussion of the 'sh' field for the printcap file, has it been tested?

Yes, by me prior to my last posting....

>ps|PostScript Enginee:\
>        :pc=/com/prf -s //bear -pr lz -transparent -post:lp=/dev/null:\
>        :sd=/usr/spool/lpd/ps:if=/usr/lib/lpf:\
>        :sh=true:\
>        :af=/usr/adm/lpacct:lf=/usr/adm/lpd-errs:

"sh=true" sets the value of sh to a string, but printcap(5) says it is a bool.
It also points out that the layout of the file is identical to the layout of
/etc/termcap.  But neither manpage says how to set the variables, so here it is:

        Type         Setting                   Example
        bool         :<capability name>:       :sh:
        string       :<capability>=value:      :sd=/usr/spool/lpd/ps:
        num          :<capability>#value:      :br#9600:

The prf option "-post" should be removed if you have a postscript printer.  It is
there for invoking the software postscript interpreter (separately priced from us)
so that you can take postscript files and print them to certain non-postscript
printers.  ( Could you tell from that vague last phrase that I don't know what type
of printers we support?? :-)

How did I test it, you say??  How about this:
1) produce postscript file on Atari 520ST at home.
2) load to my node via kermit/modem.
3) print via /com/sh and /com/prf -- it works!!
4) print via /bin/csh and /bin/lpr -- it works!!

Here is the printcap I used:
pscript:\
  :pc=/com/prf -site //wherever -transparent:\
  :sd=/usr/spool/lpd/wherever:lp=/dev/null:\
  :sh:sf:lf=/tmp/lp-wherever-errors:\
  :if=/usr/lib/lpf:

CAVEAT:

/usr/lib/lpd declares a static line buffer which is sized at
132 chars, and truncs anything longer than that.  If your postscript file
has lines longer than that (mine did) split the line at a space using the
"\<newline>" convention and postscript takes it 'jest fine.
-- 
Walt Weber               PHONE: (617) 256-6600 x7004
Apollo Computer          GENIE: W.WEBER
Chelmsford, People's Republic of Massachusetts