Return to BSD News archive
Newsgroups: comp.unix.bsd.freebsd.misc Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!chi-news.cic.net!newsfeed.internetmci.com!howland.reston.ans.net!ix.netcom.com!netcom.com!imgidata From: imgidata@netcom.com (Robert Fagen) Subject: Re: Hp laserjet 4L Message-ID: <imgidataDHK019.1qH@netcom.com> Organization: NETCOM On-line Communication Services (408 261-4700 guest) X-Newsreader: TIN [version 1.2 PL1] References: <Pine.BSF.3.91.951103130351.7968A-100000@taz.flnet.com> Date: Sun, 5 Nov 1995 04:48:45 GMT Lines: 66 Sender: imgidata@netcom.netcom.com jones (jones@taz.flnet.com) wrote: : I have a laserjet 4. in freebsd. I have been told that you can use the : line printer demon to access the printer. I went through all the bs : uncommenting out the original printcap file inserting the directory. ok : all this worked also unhasshed the lp statement in the config file. All : this is at the defaults. Ok the system rebooted and everything seemed ok : untill i tried to print a file out. I used lpr filename, the file went : into the spooler and was qued. Ok the printer fired up and I thought it : was goin to print, but alas it only printed blank pages. : If anyone else has gone through this I would appreciate your : wisdom. Ohh the system is intel based pc. : Thanks in adv. : jones@taz.flnet.com I think the problem is CR/LF mapping. I have the same problem. I wrote a filter to reference in the /etc/printcap file. I hope someone else will follow up with a better way to deal with this, but if not, here's the code: --------------------------------------------------------------------------- #include <stdio.h> main() { char c; while(!feof(stdin)) { c=getchar(); if (feof(stdin)) continue; if (c==0x0a || c==0x0c) /* if LF or FF, dump a CR after the char */ { putchar(c); putchar(0x0d); } else putchar(c); /* otherwise, just dump out the character */ } putchar(0x04); /* make sure any postscript files get closed */ } --------------------------------------------------------------------------- and here's my printcap: --------------------------------------------------------------------------- # @(#)printcap 5.3 (Berkeley) 6/30/90 lp|local line printer:\ :lp=/dev/lp:sd=/var/spool/lpd:lf=/var/log/lpd-errs:\ :of=/usr/local/bin/addctlm: --------------------------------------------------------------------------- I also have a link from /dev/lp->/dev/lpt0 Like I said, this is how I got it to work, no warranty express or implied that this isn't a dorky/inefficient/stupid/security-breaching way to do it :) PS. I also have renamed lpr to lpr.0 and have a shell script that calls it with '-h' to eliminate burst pages. It's just me, after all, I know who printed what Rob -- ------------------------------------------------------------------------ Rob Fagen | | #include <clever.sig> voice 415-432-8101 | I only represent myself | #include <witty.quote> "Sad, Demented But Social: it's not just for breakfast any more" | OB-URL: http://sdbs.org/ |