File: README.printcap

package info (click to toggle)
cti-ifhp 2.1.8-2
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 932 kB
  • ctags: 845
  • sloc: ansic: 6,036; sh: 1,524; makefile: 318
file content (82 lines) | stat: -rw-r--r-- 2,852 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Hints on How to Set Up Printcaps for the ifhp filters
		Patrick Powell (papowell@sdsu.edu)
		Fri Oct 27 06:43:31 PDT 1995

Typical printcap entries

#  No Banner
ps|for PLP/LPRng software - serial line:
	:rw:sf:sh:lp=/dev/ttyb:sd=/usr/spool/lpd:\
	:sy=9600 -echo -crmod -raw -oddp -evenp pass8 cbreak ixon:\
	:lf=log:\
	:ps=status:\
	:fx=flpv:\
	:if=/usr/local/lib/filters/ifhp:\
	:of=/usr/local/lib/filters/ofhp:\
	:vf=/usr/local/lib/filters/ifhp -c:

psnw|for PLP/LPRng software - network based HP Jetdirect card:\
	:rw:sf:sh:lp=printer.sdsu.edu%9100:sd=/usr/spool/lpd:\
	:lf=log:\
	:ps=status:\
	:fx=flpv:\
	:if=/usr/local/lib/filters/ifhp:\
	:of=/usr/local/lib/filters/ofhp:\
	:vf=/usr/local/lib/filters/ifhp -c:

# Banner printing - LPRng
	:rw:sf:sb:lp=/dev/ttyb:sd=/usr/spool/lpd:\      <- note :sb: (short banner)
	:if=/usr/local/lib/filters/ifhp:\
	:of=/usr/local/lib/filters/ofhp:\
	:vf=/usr/local/lib/filters/ifhp -c:

# Banner printing - Fancy banner produced by banner printer
	:rw:sf:sb:lp=/dev/ttyb:sd=/usr/spool/lpd:\      <- note :sb: (short banner)
	:if=/usr/local/lib/filters/ifhp:\
	:of=/usr/local/lib/filters/ofhp -Tbanner=off:\
	:vf=/usr/local/lib/filters/ifhp -c:\
	:bp=/usr/local/lib/filters/banner:\
    :bl=Seq\: $-'j  Class\: $-'C User\: $-'n Job\: $-'J Date\: $-'t

Note:
  :sf supress form feeds between files making up a job
  :sy (serial line characteristics) may be replaced by :ty
  :ps (printer status) is additional file for printer status
      in addition to the LPD daemon status
  :fx (formats checked) limits formats to f (normal text), l (bin),
      p (pass through pr), and v (used by some PC software for the
      l option)
  :if and :of - normal filter entries
  :vf  - supports the 'v' format, the -c option forces binary mode
  :bp (banner printing program) produces banner text for printer
  :  -Tbanner=off suppresses banner generation by ofhp
  :bl format for short banner line to be generated by LPRng

Problems and Solutions:
  Want to use filter with older LPD daemons, which do not support
  parameter passing or the 'sy' or 'ty' stty controls

  Solution:
   set up shell scripts: ifhp.sh, ofhp.sh, vfhp.sh
   ps|for PLP/LPRng software - serial line:\
	  :rw:sh:lp=/dev/ttyb:sd=/usr/spool/lpd:\
	  :lf=log:\
	  :if=/usr/local/lib/filters/ifhp.sh:\
	  :of=/usr/local/lib/filters/ofhp.sh:\
	  :vf=/usr/local/lib/filters/vfhp.sh:\

	ofhp.sh - ( note - only this file needs to do the stty operation )
     #!/bin/sh
	 exec /usr/local/lib/filters/ofhp \
      '-Tstty=9600 -echo -crmod -raw -oddp -evenp pass8 cbreak ixon' \
	  $*

	ifhp.sh - ( note - add  options as above if needed )
     #!/bin/sh
	 exec /usr/local/lib/filters/ifhp $*

	vfhp.sh - ( note - add  options as above if needed )
     #!/bin/sh
	 exec /usr/local/lib/filters/ifhp -c $*

  You will have to edit the banner script as well.