From owner-freebsd-questions Tue Sep 3 15:22:18 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id PAA29734 for questions-outgoing; Tue, 3 Sep 1996 15:22:18 -0700 (PDT) Received: from edna.bus.net (edna.bus.net [207.41.24.10]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id PAA29729 for ; Tue, 3 Sep 1996 15:22:10 -0700 (PDT) Received: from mabel.bus.net ([207.41.24.21]) by edna.bus.net (8.6.12/8.6.12) with SMTP id SAA04629; Tue, 3 Sep 1996 18:20:29 -0400 Message-Id: <1.5.4.16.19960903220249.347f8d54@bus.net> X-Sender: chuck@bus.net X-Mailer: Windows Eudora Light Version 1.5.4 (16) Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Tue, 03 Sep 1996 18:02:49 -0400 To: rhh@ct.picker.com From: "Chuck O'Donnell" Subject: Re: HP Laserjet 5L Cc: kaplan@cslab.tuwien.ac.at, questions@FreeBSD.org Sender: owner-questions@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk At 08:17 AM 9/3/96 -0400, Randall Hopper wrote: >On Fri, 30 Aug 1996, Leon Kaplan wrote: >> I followed the steps in the handbook but I just can't seem to >> get this working: >> >> My HP 5L is on /dev/lpt0. When I try to "cat /etc/printcap > /dev/lpt0" then >> (appart from the missing LF -> CR+LF translation) everything gets >> printed _very_ slowly (1/2 page per minute). If I use a simple filter script >> as the one below then I have the same problem. Could this be because of >> interrupt driven mode? Should I switch to polling? Any experiences? > >Sounds familiar :) Try lptcontrol -p. Either that, or remove the other >conflicting device on IRQ 7, if one exists (probably a sound card or a >second parallel port). > >Randall Hopper >rhh@ct.picker.com > > Leon, I don't know about the slow printing problem, but for the CR/LF problem, you can use the attached filter `laser.c'. It also has settings for pitch, font, and indentation. The printer does have a built in escape sequence command to set the the correct CR/LF action internally, but it was easier to do it with a filter. Let me know if you want the HP command and I'll go see if I can dig it out. For the filter, I have the following description in /etc/printcap: lp|laser|LaserJet:\ :lp=/dev/lpt0:sd=/var/spool/lpd:lf=/var/log/lpd-errs:\ :pl=66:pw=80:sh:of=/usr/local/bin/laser: The compiled filter program is installed as `/usr/local/bin/laser'. Note the non-default pl setting, which was changed from 60 lines per page to 66 lines per page using the HP Dos software on a 5P. I'm not sure if this applies to the 5L. I noticed you use `cat /etc/printcap > /dev/lp0'. I think you will need to use the lp daemon to take advantage of the filter, i.e. `lp /etc/printcap'. Hope you find this useful. Let me kow if you have any trouble with compilation. Chuck O'Donnell attachment: laser.c ============================================================================= #include #define PITCH 15 /* font pitch (10, 12, 15, or 16.67 (condensed)) */ #define INDENT 15 /* columns to indent (0-32)*/ int main (void) { int c; /* set font (courier) and pitch */ printf("\033(8U\033(s0p%dh0s0b4099T", PITCH); /* indent */ printf("\033&a%dL", INDENT); /* print the file, adding CR's */ while ((c = getchar()) != EOF) { if (c == '\n') putchar('\r'); putchar(c); } /* reset the printer */ printf("\033E"); return 0; }