Return to BSD News archive
Path: sserve!euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!swidir.switch.ch!scsing.switch.ch!news.belwue.de!fu-berlin.de!news.mathworks.com!newsfeed.internetmci.com!news.sprintlink.net!malgudi.oar.net!multiverse!rhh From: rhh@ct.picker.com (Randall Hopper) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: lpr problems Date: 7 Aug 1995 13:15:04 GMT Organization: Multiverse Lines: 107 Message-ID: <4053ko$ei5@sauron.multiverse.com> References: <3vg0pq$g5d@cmcl2.NYU.EDU> <3vtkbp$6th@hydra.msgi.com> NNTP-Posting-Host: 144.54.52.5 X-Newsreader: NN version 6.5.0 #4 (NOV) gryphon@msgi.com (Coranth Gryphon) writes: >Joseph Steinberg <steinber@slinky.cs.nyu.edu> wrote: >>I have been trying for about a month to get lpr to work on my system. >>I can cat a ps file directly to /dev/lpt0 and it prints -- but lpr gives >>me blank pages. >>All I am asking for is for someone to send me a working printcap file for >>a psotscript printer. I have an HP-4 with postscript added. >>There has to be someone out there who is using a PS printer. Please send >>me a copy of your /etc/printcap file. >I have the same problem, but with both a dot matrix (Panasoic 1124) >and non-postscript laser print (HP 2). Both work fine from a windows >box, and the parallel port has been tested known working. >I do not get anything CATting to /dev/lpt0, though. I had similar experiences with my LaserJet 4P. One cause for this was (most likely) that I had two devices sitting on IRQ 7 (the sound blaster side of my PAS16 and LPT1). Switching the printer driver to polled mode fixes that (lptcontrol -p, I think). You can stick this in your /etc/rc.local so that it'll run everytime you boot. The only other thing I needed was a printcap file that handles the conversion from UNIX end-of-line convention to DOS end-of-line (I left my LJ4P set for DOS EOL). The following printcap does this as well as sets up a "ps" queue for PostScript files, routing jobs to this queue through GhostScript (I don't have the Postscript SIMM -- $200 SIMM + $150 4Meg memory upgrade = too expensive for me). By the way, I believe one of the codes I'm sending for the "lp" queue, if copied to the text queue entry, would remove the need to running unix2dos in the text converter. It works as is though. Randall _____________________________________________________________________________ Randall Hopper | Picker International rhh@ct.picker.com | FAX: (216) 473-7098 *** WINDOWS from the folks who brought you EDLIN *** ------------------------------/etc/printcap----------------------------------- # @(#)printcap 5.3 (Berkeley) 6/30/90 #lp|local line printer:\ # :lp=/dev/lp:sd=/usr/var/spool/lpd:lf=/var/log/lpd-errs: lp|LaserJet 4P Printer (Raw):\ :lp=/dev/lpt0:sd=/usr/var/spool/lpd:lf=/var/log/lpd-errs:\ :mx#0:ff=\033E\033&k2G:fo:sh:tr=\033E: text|LJ4P w/ Unix2Dos Text Preprocess:\ :lp=/dev/null:sd=/usr/var/spool/lpd:lf=/var/log/lpd-errs:\ :of=/usr/local/bin/textlj:\ :mx#0:sf:sh: ps|LJ4P w/ Ghostscript PS->PCL Preprocess:\ :lp=/dev/null:sd=/usr/var/spool/lpd:lf=/var/log/lpd-errs:\ :of=/usr/local/bin/gslj:\ :mx#0:sf:sh: #text|LJ4P w/ Unix2Dos Text Preprocess:\ # :lp=/dev/null:\ # :if=/usr/rhh/bin/unix2dos:\ # :rm=localhost:\ # :rp=lp: #ps|LJ4P w/ Ghostscript PS->PCL Preprocess:\ # :lp=/dev/null:\ # :if=/usr/local/bin/gslj:\ # :rm=localhost:\ # :rp=lp: ------------------------------/usr/local/bin/textlj---------------------------- #!/bin/sh PRINTER=lp PATH=/usr/bin:$PATH export PRINTER PATH unix2dos | lpr -h ---------------------------/usr/local/bin/gslj-------------------------------- #!/bin/sh TMPDIR=/usr/tmp PRINTER=lp GSLIB=/usr/local/lib/ghostscript/fonts PATH=/usr/local/bin:/usr/bin:$PATH export TMPDIR PRINTER GSLIB PATH #exec gs -q -sDEVICE=laserjet -r300 -dNOPAUSE -- gslp.ps $* #exec gs -sDEVICE=ljet4 -dNOPAUSE gslp.ps - > /usr/rhh/out 2>&1 exec gs -q -sDEVICE=ljet4 -dNOPAUSE -sOutputFile=\|lpr gslp.ps - -- _____________________________________________________________________________ Randall Hopper | Picker International Senior Software Engineer | CT Visualization and Connectivity rhh@ct.picker.com | FAX: (216) 473-7098 *** WINDOWS from the folks who brought you EDLIN ***