# /etc/printcap --> /site/etc/printcap by jhs@ # http://berklix.com/~jhs/src/bsd/fixes/freebsd/src/jhs/etc/printcap # see also ~jhs/public_html/src/bsd/jhs/bin/local/lpf_vsl/lpf_vsl # - Run chkprintcap to check this file. # - If you do not specify an lf capability, LPD uses /dev/console as a default. # - lpr command sets "lp" as default printer name. # - Keep attributes off the first line, & keep names to minimal length, # & not too many multiple names, else Applixware printer menu looks # cluttered. Note Applixware only lists first label for each entry, # not 2nd alternate name. # - lpq -a also list things against first entry name # - Filters: # - filt.input=/usr/local/bin/lpf_vsl # converts groff or postscript to pcl. # - /usr/src/usr.sbin/lpr/filters installs to /usr/libexec/lpr/lpf # - A test with "man who | lpr -Ptestwc" (using /usr/bin/wc as a filter) # fails because wc doesnt like parameters passed in: # man printcap: The if filter is invoked with arguments: # if [-c] -wwidth -llength -iindent -n login -h host acct-file # FreeBSD-4.6 permissions: # chkprintcap does what man chkprintcap says, but daemon:daemon is # not quite consistent with install root:daemon. # man printcap: # du=daemon.user (manual doesnt specify default value) # Re. Form Feed: # man printcap: # Name Type Default Description # ff job.formfeed str `\f' String to send for form feed # fo job.topofform bool false Print a FF when device opened # hl banner.last bool false Print burst header page last # sf job.no_formfeed bool false Suppress form feeds # sh banner.disable bool false Suppress burst page header # od -c of Applixware & Ghostscript generated PCL files: # Groff PCL ends with FF Esc E # Applixware PCL ends with Esc & l 1 T # last page stays stuck in printer (Brother HL-P2500, # but HP-3P had same behaviour), waiting for next job to # push it out. # FreeBSD-4.5/usr/src/usr.sbin/lpr/lpd/printjob.c: # if (jobcount > 0) { /* jobs actually printed */ # if (!pp->no_formfeed && !pp->tof) # (void) write(ofd, pp->form_feed, # strlen(pp->form_feed)); # common_source/lp.h: # int tof; /* true if we are at top-of-form */ # Conclusion: # No # :job.no_formfeed: # should push out a usable form feed. # If desperate later, also try # job.formfeed=\f\n: # However this field must be used on a final stage entry that # controls a physical device. # It is no good putting it in an earlier cascade # entry, as the form feed is not passed along in the # ./c* control file, (maybe it should be though, as # an enhancement ?, but probably not worth adding # that functionality to lpd as /usr/ports/sysutils/LPRng # exists). # Applixware: # Applixware (a commercial word processor) that install into # /opt/applix/applix ; /opt/applix/builder # queues files with print command # "lp -s -c -d" # which I changed to # "lpr -P" # as it then appends name of queue (eq laser or PS or PCL5 ) # I changed this via sequence: # Preferences, Printing, Scroll to "Set the shell command". # I also needed to use a printcap entry that generated a trailing FF. # My naming convention: # ffy means yes add a FF # ffn means not add a FF # ify means yes pass through input filter # ifn means not pass through input filter # Order of action is left to right ie # host_if_ffn pass to host, then filter, then append no FF # Although default name lp comes from here # /usr/src/usr.sbin/lpr/lpr/lpr.c: # if (printer == NULL && (printer = getenv("PRINTER")) == NULL) # printer = DEFLP; # ../common_source/lp.local.h:#define DEFLP "lp" # It seems a useful safeguard to also have lp as first entry in this file. # ----------------------------------------------------------------------------- # I added mx=0 04.11.2003 as a full picture converted to bjc was near 6M. # I changed to mx#0 12.2003 as # a local print was accepted, but # a remote print of a 1.2M bjc was rejected, # & default size is just 1000 * BUFSIZ stdio.h: 1024 # I guess size is just checked during filtering. # ----------------------------------------------------------------------------- # Filter Localy; Then Send to host=lpf for switching or FF or direct printing # Needs gs on local host. lp|pcl|ify_lpf|ify_lpf_ffn:\ :mx#0:\ :filt.input=/usr/local/bin/lpf_vsl:\ :remote.host=lpf:remote.queue=ifn_ffn:\ :spool.dir=/var/spool/output/lpd.ify_lpf_ffn:\ :spool.log=/var/log/lpd-errs: applix|ify_lpf_ffy:\ :mx#0:\ :filt.input=/usr/local/bin/lpf_vsl:\ :remote.host=lpf:remote.queue=ifn_ffy:\ :spool.dir=/var/spool/output/lpd.ify_lpf_ffy:\ :spool.log=/var/log/lpd-errs: # ----------------------------------------------------------------------------- # Send to LPF filter host; Then filter. # Needs gs on lpf host lpf_ify|lpf_ify_ffn:\ :mx#0:\ :remote.host=lpf:remote.queue=ify_ffn:\ :spool.dir=/var/spool/output/lpd.lpf_ify_ffn:\ :spool.log=/var/log/lpd-errs: lpf_ify_ffy:\ :mx#0:\ :remote.host=lpf:remote.queue=ify_ffy:\ :spool.dir=/var/spool/output/lpd.lpf_ify_ffy:\ :spool.log=/var/log/lpd-errs: # ----------------------------------------------------------------------------- # Filter # Needs gs where it is invoked. ify_ffn|if:\ :mx#0:\ :remote.host=lpf:remote.queue=ffn:\ :filt.input=/usr/local/bin/lpf_vsl:\ :spool.dir=/var/spool/output/lpd.ify_ffn:\ :spool.log=/var/log/lpd-errs: ify_ffy:\ :mx#0:\ :remote.host=lpf:remote.queue=ffy:\ :filt.input=/usr/local/bin/lpf_vsl:\ :spool.dir=/var/spool/output/lpd.ify_ffy:\ :spool.log=/var/log/lpd-errs: # ----------------------------------------------------------------------------- # Input Filter No - Form Feed No or Yes ifn_ffn:\ :mx#0:\ :remote.host=lpf:remote.queue=ffn:\ :spool.dir=/var/spool/output/lpd.ifn_ffn:\ :spool.log=/var/log/lpd-errs: ifn_ffy:\ :mx#0:\ :remote.host=lpf:remote.queue=ffy:\ :spool.dir=/var/spool/output/lpd.ifn_ffy:\ :spool.log=/var/log/lpd-errs: # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bjc|bubble|canon:\ :mx#0:\ :remote.host=bjc:remote.queue=raw:\ :spool.dir=/var/spool/output/lpd.bjc:\ :spool.log=/var/log/lpd-errs: # Why no bjc_ffy ? # ----------------------------------------------------------------------------- # Switch table active on host=lpf. # If { host=lpf sends on to Axis } Use these 2 # { ffn:remote.host=lpf:remote.queue=axis_ffn:\ :mx#0:\ :spool.dir=/var/spool/output/lpd.ffn:\ :spool.log=/var/log/lpd-errs: ffy:remote.host=lpf:remote.queue=axis_ffy:\ :mx#0:\ :spool.dir=/var/spool/output/lpd.ffy:\ :spool.log=/var/log/lpd-errs: # } # OR if { host=pcl-p has a direct cable connected laser. } Use these 2 # { # ffn:remote.host=pcl-p:remote.queue=pc_ffn:\ # :spool.dir=/var/spool/output/lpd.ffn:\ :spool.log=/var/log/lpd-errs: # ffy:remote.host=pcl-p:remote.queue=pc_ffy:\ # :spool.dir=/var/spool/output/lpd.ffy:\ :spool.log=/var/log/lpd-errs: # } # ----------------------------------------------------------------------------- # Print via Ethernet to parallel converter. # ~jhs/tech/axis.communications.nps_530 # I removed :tty.device=: as I think superflous. unchecked. # axis manual says attributes such as "number of copies" wont work # (as control file arrives after data file) so maybe my attempt at # asserting :sf:job.no_formfeed: will be ignored ? axis_ffn|Network printer on Print server axis:\ :mx#0:\ :job.no_formfeed:\ :remote.host=axis:remote.queue=pr1:\ :spool.dir=/var/spool/output/lpd.axis_ffn:\ :spool.log=/var/log/lpd-errs: axis_ffy|axis|Network printer on Print server axis:\ :job.formfeed=\f:\ :remote.host=axis:remote.queue=pr1:\ :spool.dir=/var/spool/output/lpd.axis_ffy:\ :spool.log=/var/log/lpd-errs: # ----------------------------------------------------------------------------- hp|cdj|cdj670|cdj670_ffn|HP DeskJet 670 C Ink Jet:\ :mx#0:\ :job.no_formfeed:\ :remote.host=lapc:remote.queue=pc_ffna:\ :spool.dir=/var/spool/output/lpd.test_pc_ffna:\ :spool.log=/var/log/lpd-errs: # http://www.linuxprinting.org/show_printer.cgi?recnum=HP-DeskJet_670C # says: # Color inkjet printer, max. 600x600 dpi, works Perfectly # To get its maximum quality, use the "hpijs" driver. 600 dpi # in colour is not supported by the hardware. # Printer does not support PJL. # Printer supports direct text printing with the `us-ascii' charset. # Refill: dual cartridges # Known autodetection signatures: Parallel Port. # Need freebsd /usr/ports/graphics/hpoj which I havent tried yet # /usr/ports/print/hpijs - I havent tried. # ----------------------------------------------------------------------------- # Local Print - Appends no Form Feed, For use by Groff produced PCL # No :rs:daemon.restricted: as some locals have no login on print host. pc_ffna|raw:\ :mx#0:\ :job.no_formfeed:\ :banner.disable:max.blocks#0:page.length#64:tty.device=/dev/lpt0:\ :spool.dir=/var/spool/output/lpd.pc_ffn:\ :spool.log=/var/log/lpd-errs: # Local Print + Appends Form Feed, For use by Applixware produced PCL pc_ffy:\ :mx#0:\ :job.formfeed=\f:\ :banner.disable:max.blocks#0:page.length#64:tty.device=/dev/lpt0:\ :spool.dir=/var/spool/output/lpd.pc_ffy:\ :spool.log=/var/log/lpd-errs: # ----------------------------------------------------------------------------- # For when lpf_vsl can generate bjc, not just pcl # if_bjc:\ # :filt.input=/usr/local/bin/lpf_vsl:\ # :remote.host=bjc:remote.queue=raw:\ # :spool.dir=/var/spool/output/lpd.if_bjc:\ # :spool.log=/var/log/lpd-errs: # ----------------------------------------------------------------------------- # Caution lpf_vsl does not yet generate bjc, only pcl: # bjc_if:\ # :remote.host=bjc:remote.queue=if:\ # :spool.dir=/var/spool/output/lpd.bjc_if:spool.log=/var/log/lpd-errs: # ----------------------------------------------------------------------------- z_ignore|Not for humans. For chkprintcap -d to create dir for lpf_vsl:\ :mx#0:\ :spool.dir=/var/spool/output/lpd.lpf_vsl: # ----------------------------------------------------------------------------- # Serial printer # pcl_serial|hp3p:\ # :tty.device=/dev/ttyb:tty.rate#19200:xc#0177777:\ # :tty.mode=-parity,ixon,-opost: # ----------------------------------------------------------------------------- # Brother manual re its extra purchasable NC-2010p hardware: # UNIX systems that support either the Berkeley lpr/lpd printing # protocol, printing to a raw TCP port # SNMP MIB I and MIB II over IP or IPX # lpd-Plus feature for providing multiple services with custom setup # and reset strings plus text-to-PostScript conversion # Flash memory for easy updating of firmware # /etc/services has 515 TCP & UDP for printer. # tower.berklix (which goes to an ether laser) has: # lp|PS|Lexmark Postscript microLaser pro 600:\ # :tty.device=:\ # :remote.host=printserver:\ # :remote.queue=PR1:\ # :spool.dir=/var/spool/lpd/printer1-PS_600dpi-a4-raw:\ # :spool.log=/var/spool/lpd/printer1-PS_600dpi-a4-auto-default/log:\ # :acct.file=/var/spool/lpd/printer1-PS_600dpi-a4-auto-default/acct:\ # :max.blocks=0:\ # :job.no_formfeed:\ # :banner.disable: # & printserver.bsn.com has an IP on the internal net. # -----------------------------------------------------------------------------