Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mira.net.au!news.netspace.net.au!news.mel.connect.com.au!munnari.OZ.AU!news.Hawaii.Edu!news.caldera.com!enews.sgi.com!news.sgi.com!howland.erols.net!gatech!nntp-xfer.ncsu.edu!news From: rdkeys@unity.ncsu.edu (Bob Keys) Newsgroups: comp.unix.bsd.freebsd.misc Subject: How does one print postscript correctly via lpr????? Date: 2 Jul 1997 00:02:08 GMT Organization: North Carolina State University Lines: 59 Message-ID: <5pc5q0$nt7@uni00nw.unity.ncsu.edu> NNTP-Posting-Host: cc05du.unity.ncsu.edu Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:43781 OK, unix dummy here again......grrrrr! I have been trying to get a postscript printer hooked up on lpt0 (common occurrance, right?????). Cat filename.ps > /dev/lpt0 prints things just fine from root. Lpr filename.ps flushes prints in the printer buffer, regardless of who is printing. OK, what needs to be fixed. The BSD handbook suggests that a postscript printer will print fine through lpr if postscript is all that needs to be printed. The only time one mucks with the printcap file is when filters are needed or autosensing filters are needed to switch between text types (e.g. postscript, dvi, ascii, whatever). The Linux manuals chime in similarly. To me it sounds like the postscript printer is maybe not getting a correct end of line terminator (the old staircase effect), perhaps, or lpr is adding a character that barfs the printer (not expected to occur). Everything the box will do is postscript only, so that is the only type of printcap entry I will be needing. The port is the plain first parallel port, and the printer is a plain HP laserjet with postscript cartridge. Can anyone suggest the ``right'' or a working printcap entry as opposed to what comes native on the system in /etc/printcap????? The BSD handbook suggests that pcl printing would require an entry in the printcap calling a shell script: #!/bin/sh # hpif filter installed in /usr/local/libexec/hpif printf "\033\&k2G" \&\& cat \&\& printf "\f" \&\& exit 0 exit 2 from the printcap as: lp:lp=/dev/lpt0:sh:sd=/var/spool/lpd:mx#0:if=/usr/local/libexec/hpif: My old Linux box used: echo -ne \\0ee\&k2G cat echo -ne \\f for ascii text on bash, which is pretty much the same. I was under the impression that was required for straight text printing on non-postscript printers. Is this what is required also for postscript printers????? If so, it needs to be so stated in the handbook and elsewhere. Any pointers are appreciated...... Thanks, and confusedly almost getting there.....(:+\\..... Bob Keys